No scrollbars in ScrolledWindow inside wxNotebook Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Wanderer82
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 675
Joined: Tue Jul 26, 2016 2:00 pm

No scrollbars in ScrolledWindow inside wxNotebook

Post by Wanderer82 »

Hi

I'm now in the process of designing the GUI for my app. I have already created 3 wxNotebook pages and I was able to copy my code to this GUI test app so that everything now works inside a wxNotebook page. The problem is: Once I reArrange my items the scrollbars are gone and I can't move further down my text. What I could find out is that the view changes on the bottom line / border of the wxNotebook. At the start there is a double border line and when I rearrange the items the double border line is gone and only starts from where my items inside the BoxSizer end. So it seems that the ScrolledWindow isn't fit correctly into the wxNotebook page. But I don't know what I have to do. In my rearrange function I do the same as during creation of this page.

Code: Select all

ScrolledWindow1->SetSizer(BoxSizer5);
Notebook1->FitInside();
BoxSizer5->Fit(ScrolledWindow1);
BoxSizer5->SetSizeHints(ScrolledWindow1);
My structure is:

wxFrame
----wxBoxSizer1
------wxPanel1
--------wxBoxSizer2
----------wxBoxSizer3
------------(some items --> left tool bar)
----------wxBoxSizer4
------------wxNotebook1
--------------wxPanel2
--------------wxPanel3
--------------wxScrolledWindow1
--------------wxBoxSizer5
---------------(some wxFlexGridSizers)
Wanderer82
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 675
Joined: Tue Jul 26, 2016 2:00 pm

Re: No scrollbars in ScrolledWindow inside wxNotebook

Post by Wanderer82 »

Sorry, found the solution myself.

I just had to call:

Code: Select all

Layout();
Post Reply