Is there a way to acces the clicked value of a gcheckboxgroup (gwidgets2RGtk2)

40 Views Asked by At

I want to build a GUI where it is possible to click on a variable to take a look at at some data, and then decide via checkbox if you want to use it or not.

Using use.table = T i can make the different values of the checkboxgroup clickable/markable but i fail to receive the index/row/value of the row i clicked.

I've tried different handler, but i can only grab the values of the checkboxes, not the clicked row.

w <- gwindow("win", visible = T)
g <-
  gcheckboxgroup(
    c("val1", "val2", "val3", "val4"),
    use.table = T,
    container = w,
    handler = function(h, ...)
      print("checkbox changed")
  )

I want to get the index of the blue marked space

1

There are 1 best solutions below

2
On

You are likely looking for svalue, as in svalue(g) or svalue(g, index=TRUE).