I want to perform something like the one below:
- display a dataframe in RGTK2 window, with scrollbar on the right
- user can select the specific row in the dataframe by clicking on it, and I can “get” which row the user has actually clicked
I wonder if this can be done using RGtk2. Thanks.
Yes, of course. Have a look at: https://github.com/jverzani/gWidgets2RGtk2/blob/master/R/gtable.R . You can pull out most of the first request in the
initializemethod and the second in theset_selectedandget_selectedmethods. The task is made much easier (and faster!) by Michael Lawrence’srGtkDataFrameconstructor to turn data frames into models that RGtk2’s views can use quite easier.