[R-gui] gtree question

john verzani jverzani at gmail.com
Thu Aug 7 23:20:26 CEST 2008


Michael Lawrence <mflawren <at> fhcrc.org> writes:

> 
> On Thu, Aug 7, 2008 at 12:32 PM, john verzani <jverzani <at> gmail.com> wrote:
> 
> > Antje <niederlein-rstat <at> yahoo.de> writes:
> >
> > Dear Antje,
> >

Michael is right. There are other ways to include a file chooser, especially in
RGtk2. I think Antje was using the tcltk version though. Anyways, here are some
ways:

gfile() will open a dialog
gfilebrowse() adds a button to initiate the dialog

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")

but this isn't working directly for some reason with the file chooser widget.
But putting into an intermediate Hbox  works:

g <- ggroup(cont = T)
fc <- gtkFileChooserWidgetNew("GTK_FILE_ACTION_SAVE")
g1 <- gtkHBox(); g1$Add(fc)
add(g, g1, expand=TRUE)

--John



More information about the R-SIG-GUI mailing list