Reset wxRibbonPage

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.
tulu
In need of some credit
In need of some credit
Posts: 5
Joined: Tue Jan 31, 2017 5:56 pm

Reset wxRibbonPage

Postby tulu » Thu Feb 02, 2017 5:03 pm

This is likely a trivial question - so I apologize in advance, but I cannot get this to work.
I have a Frame with ribbon with the following structure:
wxBoxSizer ribSizer
--wxRibbonBar ribBar1
----wxRibbonPage ribPage1
------wxRibbonPanel panel1
------wxRibbonPanel panel2
----wxRibbonPage ribPage2
...
panel1 has to be displayed only under specific circumstances
So, before showing the frame, I call the method:
panel1->Show(<condition>);
That works fine. However, I am not able to shift everything to the left when this panel is hidden.
I tried unsuccessfully:
ribPage1->Realize();
ribBar1->Realize();
ribSizer->Layout();

What I am missing?
And if you have an answer for this, I also need to hide a button inside wxsRibbonButtonBar inside panel2. Would the same solution work for it or are there different steps?

Return to “C++ Development”

Who is online

Users browsing this forum: Bing [Bot] and 21 guests