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)
svalue(b1)
[1] "click me"


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

w = gtkWindow()
b = gbutton("button")
w$Add(getToolkitWidget(b))

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

--JOhn

_______________________________________________
R-SIG-GUI mailing list
R-SIG-GUI@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-gui

Reply via email to