[R-gui] gtree question

john verzani jverzani at gmail.com
Fri Aug 8 06:10:30 CEST 2008

Felix Andrews <felix <at> nfrac.org> writes:

> On Fri, Aug 8, 2008 at 7:20 AM, john verzani <jverzani <at> gmail.com> wrote:
> > or as Michael points out, one can put in a RGtk2 object into gWidgets via the
> > add method:
> >
> > w <- ggroup("test")
> > g <- ggroup(cont = w)
> > add(g, gtkButton("new button")
> Is that documented anywhere? I had no idea you could mix gWidgets with
> RGtk2 widgets.

Hi, well I thought I had it written down somewhere, but can't seem to find it. 

In addition to add, the as.gWidgetsRGtk2 method can be used to coerce some RGtk2
widgets into gWidgsts so that one can use the gWidgets methods:

b = gtkButton("click me")
b1 = as.gWidgetsRGtk2(b)
[1] "click me"

Also, onc can also add a gWidgetsRGtk2 object to an RGtk2 container with
getToolkitWidget, as follows:

w = gtkWindow()
b = gbutton("button")

As Michael points out, this usage is only for RGtk2. The tcltk implementation
doesn't allow it.


More information about the R-SIG-GUI mailing list