Hello,
I would like to have two toggle buttons that should work in this way:
every time I click on one of the two toggle buttons the other one, if in 'pressed' state, must get in 'non pressed' state (similar to a radio button).
I have easily achieved this behaviour but there is something else I would like to obtain.
I would like that one of the two buttons is always dark (pressed) and the other one is always light (released).
The problem is that when I press a button it gets also 'selected' and its style becomes light even if it is pressed (see "pressed_and_selected.png").
In practice I would like to disable the 'selected' style so I can obtain the described behaviour.
Is it possible? Thanks!
toggle button style
toggle button style
- Attachments
-
- pressed_and_selected.png (3.47 KiB) Viewed 1296 times
-
- pressed_and_NOT_selected.png (3.51 KiB) Viewed 1296 times
Re: toggle button style
Hi,
wxWidgets is known to use native OS controls.
If you want that kind of tweaking you probably should consider QT or some other toolkit.
But maybe someone else can help in this area.
Thank you.
wxWidgets is known to use native OS controls.
If you want that kind of tweaking you probably should consider QT or some other toolkit.
But maybe someone else can help in this area.
Thank you.
Re: toggle button style
Probably, but not without drawbacks.NonoNano wrote:I would like to disable the 'selected' style
Is it possible?
You can use a focus event handler for that button, and whenever it receives focus you can set it to some other window. But that will also mean that it will never remain focused (aka "selected"), thus it could never be pressed by using spacebar on the keyboard.
Re: toggle button style
catlink,
The OP most likely refer to disable the style visually, not from the execution point of view.
Thank you.
The OP most likely refer to disable the style visually, not from the execution point of view.
Thank you.
Re: toggle button style
Yeah that's right..but asap I will nonetheless try the solution proposet by Catalin!