Can be all radio menus be "unchecked" at the same time?
Posted
#1
(In Topic #1487)
Regular

If I have a menu with 2 RADIOS, is it possible (and normal) to have a state of 2 ot these radios "unchecked" ?
What is the correct way to toggle them, Is it bad to set menu.checked = False or True directly ?
I say that because RADIO nature is to force that AT LEAST ONE and only one to be checked . Having none checked could cause problems as the design expcted to have always one of the 2 values selected…
Please correct me or explain me if it is ok
Thanks
Posted
Regular

Manually clicking it works. The problem is doing by code.
I have seem 2 of them checked also :?:
It seems that the "radio functionality" has to be done by hand in Gambas?
All languages that has a radio if we set one to true (via code), all others become false.
Posted
Guru

RadioButton is "native" meaning it uses the underlaying toolkit, It's behaviour is all down to the toolkit.
Posted
Regular

No problem em doing the logic too, if the person is aware of the behavior
Posted
Administrator

A menu with 2 radiobuttons.
Default they are unchecked.
When clicking 'Yes' it will be checked and stay checked while application is running
When clicking 'No', it will be checked and 'Yes' will be unchecked.
Works for me on qt5, gtk2 and gtk3 (menu's just look different)
Edit: Didn't read well.
By code you can set them all to checked.
They stay checked if using gtk.
When using qt5 it works correctly (at least here -> see screen)
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
1 guest and 0 members have just viewed this.



