splitter with multiple panes which can be disabled

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
simmania
In need of some credit
In need of some credit
Posts: 1
Joined: Sat Jan 22, 2022 12:32 am

splitter with multiple panes which can be disabled

Post by simmania »

Hi,
I'm very new to wxWidget and I'm considering moving from Qt to wxWidget. I would like to know if the following is possible. For my next application I would need a splitter that splits a window into multiple parts (panes or widgets? I'm not quite familiar with the teminology yet). For instance a window splitted into 4 parts, each of which can be resized individually. But it must also be possible to hide one or more parts. When hiding one of the 4 it would result in a splitter with 3 parts until the fourth is turned back on.
Is this possible with wxWidget?
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: splitter with multiple panes which can be disabled

Post by doublemax »

Hello and welcome to the forum.

There is no class in wxWidgets that can do exactly what you want out of the box. But i think it can be achieved using wxSplitterWindow or wxSashWindow with some additional code.
https://docs.wxwidgets.org/trunk/classw ... indow.html
https://docs.wxwidgets.org/trunk/classw ... indow.html

Please try to build wxWidgets and the samples "sashtest" and "splitter" that come with it to get an idea of what they do.

BTW: When you talk about 4 windows, are they all next to each other or in 2 x 2 layout?
Use the source, Luke!
sparhawk
Experienced Solver
Experienced Solver
Posts: 81
Joined: Tue May 21, 2013 8:08 am

Re: splitter with multiple panes which can be disabled

Post by sparhawk »

simmania wrote: Sat Jan 22, 2022 1:13 am Hi,
I'm very new to wxWidget and I'm considering moving from Qt to wxWidget. I would like to know if the following is possible. For my next application I would need a splitter that splits a window into multiple parts (panes or widgets? I'm not quite familiar with the teminology yet). For instance a window splitted into 4 parts, each of which can be resized individually. But it must also be possible to hide one or more parts. When hiding one of the 4 it would result in a splitter with 3 parts until the fourth is turned back on.
Is this possible with wxWidget?
Not sure if I understand you right. If you want the window to disapear from the splitter, you can either call Unsplit and hide the window. Another option could be to set the splitter sash to 0 or to max, depending on which window you want to hide, and then keep it there until you want to show it again.
Post Reply