[Gambas-user] Toggle Button values

Fabien Bodard gambas.fr at ...626...
Wed May 5 21:03:29 CEST 2010


ok, in gambas and others language True and false are not true value
but two choiced value

togglebutton.value = true set the toogle pressed

if togglebutton.value then print "pressed"


try this too :)

print cint(true)
print cint(false)


2010/5/5 Rolf-Werner Eilert <eilert-sprachen at ...221...>:
> Hi all,
>
> In Gambas 2 I used some ToggleButtons and found it difficult to make out
> what are the correct values to be set/returned.
>
> It turned out that only 0 for "not pressed" is reliable. I can set TRUE
> and FALSE to switch it on/off from code, but it will not return these
> but 1/0. I cannot set 1, however, so I got somewhat confused :-)
>
> There is no indication in the documentation yet. So, how is it supposed
> to be used?
>
> Regards
>
> Rolf
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list