[Gambas-devel] Bug with radiobutton and gtk
Benoit Minisini
gambas at ...1...
Thu Nov 8 14:42:45 CET 2007
On jeudi 8 novembre 2007, José Luis Redrejo wrote:
> 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.
RadioButtons are mutually exclusive, so you just have to set the only one that
should be set. All other RadioButtons having the same parent will be unset
automatically.
Regards,
--
Benoit Minisini
More information about the Devel
mailing list