Frage

I use the code below to create a checkbox for user to check/uncheck it.

input.form1.015.checkbox <- gtkCheckButton("15_check")

I wonder how I can extract the value of the checkbox (i.e. whether it is checked or not)

Currently I use the following:

gSignalConnect(input.form1.015.checkbox,"clicked",function(widget)print("Hello world1!"))

But I think this is not very nice, as I need to have the initial value of the checkbox first.

Can anyone help? Thanks.

War es hilfreich?

Lösung

The active property holds this value. You can access it directly via $ and $<-, as in input.form1.015.checkbox$active <- TRUE, or the methods getActive and setActive.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top