[Gambas-devel] Bug with radiobutton and gtk

José Luis Redrejo jredrejo at ...176...
Thu Nov 8 14:30:27 CET 2007


2007/11/8, Benoit Minisini <gambas at ...1...>:
>
> On mercredi 7 novembre 2007, José Luis Redrejo wrote:
> > Hi again, using a RadioButton control with gtk , it does not accept
> changes
> > by code  in its value property. Clicking with the mouse on it works
> right.
> >
> > So:
> > RadioButton1.value=false
> > does not work in gtk, but does it with qt.
> >
> > Regards.
> > José L.
>
> Actually isn't it a bug in gb.qt?
>
> I see no reason for manually setting a RadioButton value to FALSE. If you
> need
> that, you should use a CheckBox, don't you?
>
>
Checkbox does not update automatically the others options, as radiobutton
does. It's quite easy to find its needs: Just think of some program options:
you read the options from a Settings file and present them in a form for the
user to be able to change them. For instance: male-female, hair color:
brown, red, blonde, black, etc. In these cases it's useful to re-read the
Settings files and present to the user the values he chose in a previous
action.  So you do need something like :
optSexMale.value=(mySettings["sex"]="male")
and automatically optSexFemale will be updated to the right value to show it
in a form.
In my case the problem arise trying to do something like
optInternetEnabled.value=(mySettings["EnalbledInet"]="1"), and there is no
logical default value for things like this.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20071108/70e60fcf/attachment.html>


More information about the Devel mailing list