Alternative to radio buttons?

With radio buttons effectively killed off, does anyone know whether will we instead be given this control as seen in the IDE UI ?


I’m about to make a canvas-based vertical version that allows several positions (not just 2).

I guess I missed something?

? Are they ?

will we instead be given this control

That’s more of an alternative to a checkbox.
It has always been possible (with work) to put a bunch of checkboxes on screen and ensure that only one was set to True.

Xojo doesn’t expose this as a usable control for desktop (no idea why , either) but there are a few similar controls ‘out there’
It is probably possible to grab such an image and use it (and the reverse) in a canvas if you like.

Yes, you can only do multiple RadioButtons and not one. You can’t do them horizontally or give them more vertical space.

Radio Buttons are not „killed of“. In API 2.0 you have two options. Use a DesktopRadioGroup or a DesktopRadioButton. DesktopRadioButton won’t shown in the Library as Xojo, sadly, decided DesktopRadioGroups are the way for users. So you have to add e.g. a DesktopCanvas and set his Super to DesktopRadioButton.

For now there isn’t a DesktopSwitch control like you show in your screenshot. I imagine when Xojo switch to the new WinUI controls on Windows (it’s on the Roadmap) we‘ll maybe get something like this as they exists for all three OS (macOS - NSSwitch, Linux - GTK.Switch, Windows - ToggleSwitch).

1 Like

Well, then my feature request is simply to make the control visible again in the Library.

1 Like

‘Only multiple’ makes sense for radiobuttons.
The rest… just… why?

Horizontal can be segmented control, I guess.

Not if you have longer text.

1 Like

Obviously, having a single radio button doesn’t make sense.

The problem with DesktopRadioGroup is that you are forced into a very basic layout.

For example, you cannot do this:

• Radio 1
   Edit Field

• Radio 2
  ---List Box---
  |            |
  |            |

• Radio 3
   Edit Field
1 Like

You could check out this: The ZAZ: ZirconSwitch

1 Like

Did you make this feature request? I’d certainly support it.

<> : RadioButtons missing in Desktop API 2

Right, just added to that.

I can’t speak for Mac users but on Windows there is an option in the Inspector to set the radio buttons in the group to Horizontal. What I can’t seem to figure out is how to have, say, 4 buttons arranged in a 2x2 display.

Heheh… hadn’t noticed the “horizontal” option either. But the option has the same problem like the vertical space: I want more space. What was a simple control is now much messier.

I have tried to convert a project to API 2.0 and my RadioButtons are converted to single DesktopRadioButton.
I copy and paste one into a new project and that works…as old RadioButton.

You can also add a DesktopRadioGroup and convert it as a DesktopRadioButton by changing it’s super

This didn’t happen when I converted mine.

21r.3 vs 21r3.1 ?

2021r3.1 for me.

I made a little example to show that :