[2.7.0-1 wxMac] Problems (bug?) with wxScrolledWindow
H
H at h.com
Sat Aug 26 15:51:44 PDT 2006
When I add the following statement to the MyFrame constructor (last
lines of the constructor) in the minimal sample I do not get a scrolled
window with scrollbars:
wxScrolledWindow* Ptr1(new
wxScrolledWindow(this,wxID_ANY,wxDefaultPosition,wxSize(50,50),wxScrolled
WindowStyle | wxALWAYS_SHOW_SB));
If I add these lines to the constructor
wxScrolledWindow* Ptr1(new
wxScrolledWindow(this,wxID_ANY,wxDefaultPosition,wxSize(50,50),wxScrolled
WindowStyle | wxALWAYS_SHOW_SB));
Ptr1->Hide();
wxScrolledWindow* Ptr2(new
wxScrolledWindow(this,wxID_ANY,wxDefaultPosition,wxSize(100,100),wxScroll
edWindowStyle | wxALWAYS_SHOW_SB));
I can see the scrollbars.
If I add another line:
wxScrolledWindow* Ptr1(new
wxScrolledWindow(this,wxID_ANY,wxDefaultPosition,wxSize(50,50),wxScrolled
WindowStyle | wxALWAYS_SHOW_SB));
Ptr1->Hide();
wxScrolledWindow* Ptr2(new
wxScrolledWindow(this,wxID_ANY,wxDefaultPosition,wxSize(100,100),wxScroll
edWindowStyle | wxALWAYS_SHOW_SB));
Ptr2->SetSize(200,200);
Then, the scrollbars are gone again. It seems to be that the SetSize
method lets the scrollbars disappear. Why I do not know because I am not
so familiar with the Mac interface routines.
In the very first example SetSize is not explicitely called but I guess
implicitely.
Any ideas?
Hartwig
More information about the wx-users
mailing list