Alternative to radio buttons?

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 :
https://adx-online.com/TestRadioButton.xojo_binary_project.zip

set up as a control set
then you don’t need one
if me.Value then SingleRadioButton1.Value = False

There are some nice things about RadioButtonGroups, such as you can have 2 or more sets of them on a window without having to draw a canvas around them and a single RadioButtonGroup.SelectedIndex property.

But the spacing issue is certainly an issue. If I do have two RadioButton “sets” on the Window then I quite like them to be lined up first option above first and second above second etc.

DesktopRadioButton certainly should be added to the Library so it is easy to add. The RadioButtonGroup contains individual DesktopRadioButton controls so at least that control is not in any danger of being removed.

Horrible nasty option to getting more space, at least in horizontal mode, add spaces to the label :face_vomiting:

I don’t want sets. I don’t want groups the way 2021r3.1 does it, either.

I want to do what Bjorn Ericsson showed (Sept 2021) here, where under each button there are other controls, and in my case I want the radio buttons horizontally. I have no issues with the coding, its that the 2021 r3.1 IDE doesn’t allow this anymore, but it will compile and run projects built from earlier versions of the IDE that did.

https://forum.xojo.com/t/radio-group-what-kind-of-horror-is-this/65805/19

There’s another thread suggesting that capability will not be restored, which is why I wrote “killed off” - they effectively are - and now have to make a canvas substitute.

Another example why IMHO Xojo is limited to being a RAD prototyping tool like HyperCard or SuperCard were - to make a complex proper app its necessary ultimately to use platform-specific toolsets that support the features users asked for.

1 Like

It does allow it. The control is available and can be used. It is just missing from the library. Hopefully that is an oversight. If you drop a canvas on your form and change the super to DesktopRadioButton then you have a control you can copy and paste and use just as before. You are not using a canvas by doing this.

The DesktopRadioGroup control uses DesktopRadioButton to provide its buttons, so it is not killed off, it still exists and has to for Group to work.

Horizontal is an option with Group.

1 Like

Because Jeff said a radio button was an alternative to a Check Box, I had to raise my curmudgeon’s eyebrow. You kids today :confused: … But I know you can’t help it. How can you expect to know what “clockwise” means when your timepieces show digital numbers? How can you know what “radio buttons” are if your car just has a search control and no Push On/Off button?

So here’s the history … Long, long ago, cars had radios with about five or six physical buttons on the small faceplate. You could set each button to a different radio frequency - the station you wanted. But when you pushed one in, the button that was previously selected would push out. You could only have one choice “active” among the five or six choices available. That was a radio button; that’s how the control is expected (UI standards) to work.

A checkbox, on the other hand, was designed for selecting one or more things at a time from a group. Think of ordering a pizza. You have many topping choices. If you were to put something on-screen for the user to “design” their own pizza, you’d use checkboxes so they could select mushrooms, olives, artichoke, and …

Now if the pizza place let you designate ONLY ONE topping per pizza, then radio buttons would be the correct control - not checkboxes.

Of course, that was in the old days, Now, who cares about craft. When you deal with numbers and messages, why ascertain the quantity and change the text of the message to use the correct singular/plural verb. Why consider the intentional action and have the action button display that intention - like Attach instead of Open for attaching a file to an email. I know, you can’t “roll your own” controls for that because even if you could finagle it, the computer manufacturer will change the hardware/core code and your “own” will break. Sigh.

Now where did I leave my punchcard box … :grinning:

7 Likes

In a nutshell:

A radiobutton is for choosing between two or more alternatives - with options. And the options may be unique to the selection…

A checkbox is a binary choice - X or not X.

What would be neat is this control but implemented vertically - extended with a small number of choices -say maximum of 5. There are mechanical examples of slider buttons that implement 3 or 4 choices … The current implementation in the IDE clearly did not think of the possibilities.,… Which is DUMB.

Oh and Xojo… beat me to it… I’ll give you 1 week. And I work a day job, this is ■■■■■■■■■■■ stuff.

Screen Shot 2022-01-19 at 4.17.59 pm

Is that thread DELETED??

Wow, censorship instead of listening to the users… The usual.

I can still see the thread. What is really odd is that the feature request “65999 - Bring back RadioButton as a DesktopUIControl subclass” is “Implemented & Verified”. What the f was implemented there?

I suspect it’s in the Testers channel.

1 Like

Because Jeff said a radio button was an alternative to a Check Box,

:slight_smile:
No, I said
image

was an alternative to a checkbox.

It operates independantly, and doesn’t automatically set or unset any other control.

when you pushed one in, the button that was previously selected would push out.

Yep, thats a radio button.

Personally I think it’s the worst UI element ever. DIfferent people use different colours to represent “selected”. And its being slid to left or right tells you nothing at all. Whereas with a checkbox it’s pretty obvious whether it’s selected or not.

We’re seeing the same sort of nonsense on websites, where you often see a set of coloured rectangles, some of which are clickable and some aren’t. And so on.

5 Likes

He, I thought I was the only one to be confused by those things.

Don’t worry, these “UI Experts” will come along along soon with other gems, such as covering the screen with coloured rectangles with text in, and you have to guess which are clickable and whch are not … oh wait …

Even worse, menus on set-top-boxes or streaming services which have two options on screen in text, in 2 different colors.
Using the arrow keys you can make the colors swap, so one is blue and one is orange, or vice versa
But you have no idea which one will be chosen when you click OK.

  • Shoot the Dog
  • Win $1000

…choose wisely…

4 Likes

For me, that’s win-win. I prefer cats.

3 Likes

There’s nothing that complicated about a switch. Left is off, right is on. Light switches don’t confuse you do they? Up is on, down is off right? There’s no colors and the labels they do have are next to useless. But you do it out of habit. Why can’t a horizontal switch work the same way? If you’re really concerned, a good switch control supports captions on each side.

A switch control works great when you need its label on the left, just like it was originally designed.

I’ve never seen a switch that works horizontally. I’ll have to check, but such may even be illegal. And no, UP is OFF and DOWN is ON.

1 Like