Alternative to radio buttons?

And my point was that (a) I don’t believe I’ve ever seen a horizontal switch and that (b) people shouldn’t assume that because something operates a certain way in their locality, it operates that way everywhere. Radio buttons and checkboxes have been around for years, being (before the Internet) on radios (odd that, eh?) and on paper forms we all fill in for the Gumment. They do not, therefore, need “improvement”.

And one could save the result as the default project.

That’s because you have switches like that.
Here, and presumably in a lot of places in Europe, we have either switches with “1” and “0”, with a built-in light, or, the most common, a blank switch (you know the lamp is on or off and it’s the only hint).
If I’d came to your country, I’d not know which side does what.

Choosing between switches, which have plenty flavours, shapes and directions around the world, and a checkbox where a √ or X will always mean it’s on, the latter sounds more intuitive anyway.

easy to tell though, if light is off then switch goes one way to turn on, if light is on it goes one way to turn off?

Yes. My point was that the switch doesn’t necessarily tell you what you want to know.

1 Like

Yes, but it’s not always that simple. You don’t put a checkbox to the right of the label. This thread makes a few good points: layout - Should checkbox labels be to the right or the left? - User Experience Stack Exchange but the TLDR is: don’t do it. It’s also why we’re not given the choice.

So when you have a design that calls for such a thing, such as the iOS Settings app where the concept was introduced, you should do something else. That’s what they did. I don’t think anybody is saying the switch should replace the checkbox. They each have correct usages, and there’s no reason to be bothered by a new control.

As for intuitiveness, there are solutions to that. On iOS you can turn on an accessibility option that marks a 1 or 0 on each side so it’s more explicit. But usually, when the switch is filled with color, it’s on.

Now, there are absolutely times when the design is abused and it’s hard to figure out which is which. This is on the designer though. We don’t have universal switch UIs yet, so it’s not as simple as just dropping a checkbox on a window and calling it a day. I wish it were, so we’d have some sort of consistency, but it isn’t. That doesn’t mean the control should be avoided, it means as a designer, you should make accessible decisions for your app.

That gets ‘entertaining’ if you are replacing a light bulb.
If you do not know which way is which, the socket may be live.
It’s the same problem with dimmer switches that push in and out. (Oh no… I introduced another one!)

2 Likes

You just turn the breaker off in that case :grin:

Jeff, you are correct Sir :slightly_smiling_face: I had to go back and more carefully follow the thread.

For me, that slide button was a puzzle. I first saw it on an iPad and because it was ON/OFF, I thought I had to push, not slide, it. And using colors to signify on/off, especially colors in the “color-blind” spectrum, can lead to ambiguity. When someone is On The Air, I believe that On-ness is signified by a red light. When my coffee maker is ON, the rocker switch is Red. There are a lot of contextual elements in determining if a color means On or Off.

The Mac Database, Panorama, lets you put radio buttons where you want vertical/horizontal and you drag a rectangle around them to designate a cluster. All the buttons in that cluster will allow only one of the many to be selected.

It sounds like Xojo is not as flexible. So there would be more programming to draw/fill your own circles (there are a lot of “button” graphics) and track the mouse click within those circles, triggering the On/Off condition. I’d imagine if the On radio button were clicked again you could allow it to go OFF (nothing selected) or, if that is disallowed, put up a Beep or message (audio might be off) saying another of the available choices must be selected.

Same in France.

Just an example:
In our hallway we have 2 switches. One switch at each end of the hallway. These switches change their behavior with each operation on the opposite side. :wink:

I think there’s no one-fits-all switch. Additional Labels are always recommended (and in my example impossible to “label”). :slight_smile:

1 Like

In my hallway, be have buttons (not switches); press to get the lights.

In the snail mailboxes, there is no buttons nor swithches; only infrared moves detector that set the lights on.

Who have another different way to change the lights ? Siri ? Alexia ? Whatever ? :joy:

I’ve seen them where they put two horizontal switches into a “single gang” electrical box due to space restrictions. Essentially each switch is sideways in a shape allowing a standard power outlet cover to be used.

And three (or more) pole switches could be ON in either the up or down position, depending on the state of the other switch(es). Which is why they also do not have an embossed ON or OFF if you look closely at the switch.

But I digress…

Reminds me of asking grandkids why they call it “dialing a phone” or “hanging up a phone”…

and you can have a look at all other types of buttons…

1 Like

Thanks for explaining how to add DesktopRadioButton to a project. I am updating code to the newest Xojo release and have been searching for the control.

Karen, what I did is:

  1. Download Xojo 2020 release 2.1 (or earlier).

  2. Create a desktop project with a window with a couple of radio buttons (ungrouped) on it, save this someplace. Make the file read-only too so you can’t accidentally save over it.

  3. In Xojo 2021 or later when you need standalone radio buttons, open this project, copy & paste to the project you’re working on.

Using Xojo 2020 I now maintain project containing a collection of special controls that I’ve made over the years, and copy them to new projects when I need.

Ever since the early days of RB 20 years ago I learned never trust a recent release of RB/Xojo, it always pays to stay a few revisions behind if you want stuff to work properly. They fix one thing, and introduce unexpected “surprises”.

3 Likes

This is not fair. It not only applies to Xojo… Others (and most of us) have the same problem… :slight_smile:

2 Likes

Unless you’re in the UK, where down is on, presumably representing pulling power down from the sky or something. At least that’s how it was when I lived there in the early 80s.

In any case, the true “Radio Button” in Xojo is obviously the SegmentedControl, which can look and work like real-world radio buttons did. Too bad it’s not simpler to use and doesn’t offer options like text size etc.