[2.7.0-1 wxMac] Problems (bug?) with wxScrolledWindow

H H at h.com
Sun Aug 27 00:31:17 PDT 2006


In article <A10F821B-CD57-42E9-9EAF-A5C0943D6824 at theolliviers.com>,
 kevino at theolliviers.com (Kevin Ollivier) wrote:

> Hi Hartwig,
> 
> On Aug 26, 2006, at 3:51 PM, H wrote:
> 
> [snip]
> 
> >
> > 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?
> 
> The issue is that wxALWAYS_SHOW_SB is not implemented for wxMac, so  
> it only adds scrollbars when you have content that exceeds the  
> physical dimensions of the window. See the wxWindow docs for this  
> flag for more info.
> 
> Regards,
> 
> Kevin
> 
> > Hartwig
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org

Hi Kevin,

may be but then something is completely weird: if I call 'HasScrollbar' 
I get for the horizontal and vertical scrollbar a 'true' back. But the 
scrollbars are not shown.

If I add in the previous example the last line, then, there should be 
definitely two scrollbars. But there aren't any.


    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);
    Ptr2->SetVirtualSize(400,400);

Hartwig






More information about the wx-users mailing list