[Gambas-user] ToggleButton

ron ronstk at ...239...
Tue Dec 4 19:55:05 CET 2007


On Tuesday 04 December 2007 16:06, Stefano Palmeri wrote:
> Alle 15:57, martedì 4 dicembre 2007, Dominique SIMONART ha scritto:
> > Hi everybody,
> >
> > How can I force a togglebutton to be ON by program?
> >
> > an exemple: a program could accept Reading, Updating and Erasing modes
> > I associate these modes with 3 togglebuttons and I want the program
> > start with the Reading mode. All is OK except the togglebutton is not ON.
> > I search for something like Checked, but I cannot found anything similar
> > in the properties.
> >
> > Thank for your help
> > Dominique Simonart
> >
> 
> In  properties set Value = True
> 
> Stefano
> >

Dominique, you can do it also in the Form_Open code.
But take care the code related to the actual pressing that
button is also executed at that moment. 

This can be used to update other related controls which are
not (pre)initialized by setting the property in design mode,
i.e. a list/column-view with items.

To prevent this executing you can lock the events.

Ron




More information about the User mailing list