Radio buttons with custom icons don't always hilite
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Radio buttons with custom icons don't always hilite
Hi,
I have replaced the Icon and Hilite Icon of my radio buttons with images of bigger radio buttons. I find that frequently when you quickly click on a radio button it will briefly hilight and then un-hilight again, leaving no button hilighted.
There is no code associated with them at this point. They're just doing their default livecode thing.
The problem happens randomly, sometimes after 4 clicks, sometimes after 20. I think its when you click quickly whereas if you click more deliberately it doesn't happen. I have tried clicking into the centre of the button and more on the edge but it happens in both cases.
I tried clicking about 100 times on some default radio buttons and it didn't happen.
Any ideas? Its not great for usability.
Running on Windows. Happens both when running in the livecode development environment and when running on its own.
Dell Latitude laptop, Windows 10 Enterprise.
I have replaced the Icon and Hilite Icon of my radio buttons with images of bigger radio buttons. I find that frequently when you quickly click on a radio button it will briefly hilight and then un-hilight again, leaving no button hilighted.
There is no code associated with them at this point. They're just doing their default livecode thing.
The problem happens randomly, sometimes after 4 clicks, sometimes after 20. I think its when you click quickly whereas if you click more deliberately it doesn't happen. I have tried clicking into the centre of the button and more on the edge but it happens in both cases.
I tried clicking about 100 times on some default radio buttons and it didn't happen.
Any ideas? Its not great for usability.
Running on Windows. Happens both when running in the livecode development environment and when running on its own.
Dell Latitude laptop, Windows 10 Enterprise.
Last edited by standgale on Fri Jul 02, 2021 2:27 am, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Radio buttons with custom icons don't always hilite
Frankly I'd cook up my own buttons and then you'd have 100% control over
how they'd behave.
how they'd behave.
Re: Radio buttons with custom icons don't always hilite
How do you script the (in LC automatic) behavior of a group of your custom radio buttons?
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Radio buttons with custom icons don't always hilite
HI.
Craig
I have never seen this. But are you saying that ordinary radio buttons exhibit this, or just your souped-up ones?I find that frequently when you quickly click on a radio button it will briefly hilight and then un-hilight again, leaving no button hilighted.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Radio buttons with custom icons don't always hilite
Hi standgale,
Here is an exanple custom radiobutton works fine on OSX
can you please test it on windows.
viewtopic.php?f=53&t=29318&hilit=radio#p154618
Best regards
Jean-Marc
Here is an exanple custom radiobutton works fine on OSX
can you please test it on windows.
viewtopic.php?f=53&t=29318&hilit=radio#p154618
Best regards
Jean-Marc
https://alternatic.ch
Re: Radio buttons with custom icons don't always hilite
Another thought -
If this only occurs with your enlarged images of the buttons, it may be that there are some stray transparent pixels in your images. If your mouse happens to hit one of those, the click will go right through the image and get lost. You could try changing the images to circle graphics with a solid fill colour and see if the issue goes away.
Short answer - check your graphics to make sure there are no "holes".
If this only occurs with your enlarged images of the buttons, it may be that there are some stray transparent pixels in your images. If your mouse happens to hit one of those, the click will go right through the image and get lost. You could try changing the images to circle graphics with a solid fill colour and see if the issue goes away.
Short answer - check your graphics to make sure there are no "holes".
Re: Radio buttons with custom icons don't always hilite
standgale
I can't reproduce this.
Are you certain you don't have a script in the group or message path that is also being invoked?
I can't reproduce this.
Are you certain you don't have a script in the group or message path that is also being invoked?
Re: Radio buttons with custom icons don't always hilite
Hi, I tested with this one - just clicking back and forth from one radio button to the other about 100 times and got about 8 times when it highlighted for a moment then unlighted, leaving both unhighlighted
Re: Radio buttons with custom icons don't always hilite
I tried a bunch of clicks on default radio buttons with no issues.dunbarx wrote: ↑Thu Jul 01, 2021 1:02 pmHI.
I have never seen this. But are you saying that ordinary radio buttons exhibit this, or just your souped-up ones?I find that frequently when you quickly click on a radio button it will briefly hilight and then un-hilight again, leaving no button hilighted.
Craig
Re: Radio buttons with custom icons don't always hilite
There's no script, they are just normal radio buttons dragged out of the tool bar and grouped, with the Icon and Hilite icon changed to different images via the property inspector. The images are stored on another card.
Re: Radio buttons with custom icons don't always hilite
I thought of that but I think they are ok, plus it happened with the example I tried just now which someone posted. Also, they do highlight briefly before unhighlighting again, so it does hit something in the first instance.kdjanz wrote: ↑Thu Jul 01, 2021 6:23 pmAnother thought -
If this only occurs with your enlarged images of the buttons, it may be that there are some stray transparent pixels in your images. If your mouse happens to hit one of those, the click will go right through the image and get lost. You could try changing the images to circle graphics with a solid fill colour and see if the issue goes away.
Short answer - check your graphics to make sure there are no "holes".
I'm thinking that maybe the mouse moves slightly during the click and ... something? But why do the default radio buttons work?
Ok, I tested using the buttons by the touchpad (instead of the USB mouse plugged into the laptop). The buttons by the touchpad produced an even worse result. I think its because you can move your finger slightly over the touchpad at the same time you press the mouse button.
Deliberately moving my finger on the touchpad as I click reproduces the issue or even produces a flickering radio button - flickering between hilighted and unhilighted. Although its way harder to move at the same times as you click on the default radio buttons because they are so small, experimentation with the default buttons does not produce the error.
Re: Radio buttons with custom icons don't always hilite
Would you be able to share a simple stack with the offending radiobuttons?
Re: Radio buttons with custom icons don't always hilite
I found that if I turn off the auto highlight property and manually highlight in the "mouse up" then it seems to solve the issue.
I have attached a project containing the initial radio buttons, the ones with the above solution, and the defaults.
I have attached a project containing the initial radio buttons, the ones with the above solution, and the defaults.
- Attachments
-
- problem radio buttons.zip
- (3.15 KiB) Downloaded 129 times
Re: Radio buttons with custom icons don't always hilite
Sorry, i missed that link.
It doesn't occur at all on mac (MacOS 11.4).
I fired up a virtual ubuntu installation on vitualbox - this does happen in LC 9.6.2 on ubuntu 20.04 - occasionally the radiobutton you click on appears refractory and doesn't hilite, but the previously highlighted one un-hilites so you end up with both radiobuttons un-hilited.
This doesn't happen when resetting the custom icon back to the default so its definitely a weird one... glad you found a work-around, but might be worth a bug report?