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.
How to add widgets of gWidgets to widgets of rgtk2 ???
2 messages · KRISHNA2222, j verzani
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.