KRISHNA2222
2012-Nov-30 07:28 UTC
[R] How to add widgets of gWidgets to widgets of rgtk2 ???
I have a layout in gwidgets. To this, I wanted to add a Textbox(gtkEntry) created from rgtk2... The code is as follows: MainLayOut <- glayout(homogeneous = FALSE, spacing = 10, container SubGroup) MainLayOut[1, 1, anchor=left] <- "Number of Total Patients: " font(MainLayOut[1, 1, anchor=left]) <- c(weight="bold") patients <- gtkEntry() patients['text'] <- "200" patients['xalign'] <- 1 MainLayOut[1, 2, anchor=Right ]$add(patients) # <- gedit("200", container=MainLayOut) Error: Error in MainLayOut[1, 2, anchor = Right]$add : $ operator is invalid for atomic vectors please provide me a solution Thanking you Krishna -- View this message in context: http://r.789695.n4.nabble.com/How-to-add-widgets-of-gWidgets-to-widgets-of-rgtk2-tp4651396.html Sent from the R help mailing list archive at Nabble.com.
jverzaniNWBKZ
2012-Nov-30 19:55 UTC
[R] How to add widgets of gWidgets to widgets of rgtk2 ???
For this it would be best to insert an intermediate group container, as its add method allows you to add the RGtk2 widgets. Something like: library(gWidgets) options(guiToolkit="RGtk2") library(RGtk2) w <- gwindow() lyt <- glayout(cont=w) lyt[1,1] <- (g <- ggroup(cont=lyt)) widget <- gtkButton("click me") add(g, widget) Otherwise you can get the underlying GtkTable widget with: getToolkitWidget(lyt) -- View this message in context: http://r.789695.n4.nabble.com/How-to-add-widgets-of-gWidgets-to-widgets-of-rgtk2-tp4651396p4651491.html Sent from the R help mailing list archive at Nabble.com.
Seemingly Similar Threads
- Automation of R input
- gWidgets (tcltk): problem extracting values from widgets in glayout grid
- vorbiscomment gui ideas
- error message when plotting survival curves
- Branch 'vivi' - 15 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_debugger.h libswfdec/swfdec_as_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_types.h vivified/core vivified/ui