Using ToggleButtons to display Pages

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
murali88
In need of some credit
In need of some credit
Posts: 5
Joined: Sun May 07, 2017 7:10 am

Using ToggleButtons to display Pages

Post by murali88 »

Hi,

I would like to use wxToggleButtons to display pages in my window. Each button will have page label, which i want to display. I do not want to use tabs to display pages as it makes things complicated in my application.

I want to do something like this

click on Btn1 -> should display my first page which contains some set of controls.
click on Btn2 -> should display second page which contains another set of controls

Is is Possible to like this ? Can u post me sample code so that i can start with ?
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Using ToggleButtons to display Pages

Post by doublemax »

I do not want to use tabs to display pages as it makes things complicated in my application.
Isn't that exactly the same as using tabs from a GUI point of view?

First, use a wxSimpleBook instead of wxNotebook:
http://docs.wxwidgets.org/trunk/classwx_simplebook.html

For the buttons use wxToggleButton.

Then, you have to remember which wxToggleButton is pressed at the moment and if another one is pressed, you have to deselect the previous one.
Use the source, Luke!
Post Reply