Ticket #14856 (new defect)
Streamline wxALWAYS_SHOW_SB handling in wxScrolled::Create()
| Reported by: | Mdx4 | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | wxOSX-Cocoa | Version: | 2.9-svn |
| Keywords: | wxScrolledWindow wxALWAYS_SHOW_SB | Cc: | |
| Blocked By: | Patch: | no | |
| Blocking: |
Description
If you use wxScrolledWindow with the wxALWAYS_SHOW_SB flag this leads to crash in initialization.
Probably could be related with "wxScrolled<> does not disable scrollbars when wxALWAYS_SHOW_SB is used" ?
http://trac.wxwidgets.org/changeset/72621
http://trac.wxwidgets.org/ticket/13616
GetClientSize is called too early and GetPeer() returns NULL.
How to reproduce it:
Index: samples/caret/caret.cpp
===================================================================
--- samples/caret/caret.cpp (revision 73027)
+++ samples/caret/caret.cpp (working copy)
@@ -306,7 +306,7 @@
MyCanvas::MyCanvas( wxWindow *parent )
: wxScrolledWindow( parent, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
- wxSUNKEN_BORDER )
+ wxSUNKEN_BORDER | wxALWAYS_SHOW_SB )
{
m_text = (wxChar *)NULL;
