How to have all RadioTools in a group deselected?

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
wonkey_monkey
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sun May 26, 2019 8:10 pm

How to have all RadioTools in a group deselected?

Post by wonkey_monkey » Sat Aug 03, 2019 8:05 pm

I've got a Toolbar with a group of RadioTools. When the program first opens, I want them all to be disabled, but the first one always uses the non-disabled bitmap, because (it seems) one of the RadioTools in the group must be selected at all times, even if they are all disabled.

Is there a way to add an extra invisible RadioTool, which I can toggle on when I want all the visible tools to look disabled and inactive?

Or will I have to make them all regular tools, and handle the radio toggling myself?

Or is there another solution?

User avatar
doublemax
Moderator
Moderator
Posts: 14314
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to have all RadioTools in a group deselected?

Post by doublemax » Sat Aug 03, 2019 8:57 pm

Or will I have to make them all regular tools, and handle the radio toggling myself?
That's what i'd do.
Use the source, Luke!

wonkey_monkey
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sun May 26, 2019 8:10 pm

Re: How to have all RadioTools in a group deselected?

Post by wonkey_monkey » Tue Aug 06, 2019 5:11 pm

I went with something else in the end. If I'm disabling all the tools, I toggle the first one on and set its active bitmap to be the disabled bitmap. Then when I re-enable, I reset the active bitmap. This makes all the tools look and act disabled. Seemed like less trouble than re-inventing radio tools from scratch.

Post Reply