0

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 Answers1

0

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

jverzani
  • 5,600
  • 2
  • 21
  • 17
  • Sorry for the late answer. I am not looking for the svalue, since it returns me the values of the checkboxes. I am looking for a way to get the clicked row in the table which contains the checkboxes. Thank you for trying to help :) – Christian Ka Apr 28 '20 at 11:17
  • `svalue(..., index=TRUE)`? – jverzani Apr 28 '20 at 19:41