0

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.

lokheart
  • 23,743
  • 39
  • 98
  • 169

1 Answers1

0

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.

jverzani
  • 5,600
  • 2
  • 21
  • 17