I'm not an expert on gWidgets, but my understanding is that the gtree is
populated automatically through a callback. Thus, adding/removing rows
should be possible by having the callback return a different set of nodes.
As for opening and closing nodes, changing the color, etc, you might need
to make calls to the underlying toolkit like RGtk2 or qtbase. John might
correct me. Those things are certainly possible with the low-level APIs.

For reference, there is a book named "Programming Graphical User Interfaces
in R" by Lawrence (disclaimer: that's me) and Verzani.

Michael



On Thu, Jan 31, 2013 at 7:36 AM, Nicholas Crookston <ncrookston...@gmail.com
> wrote:

> Hi:
>
> I'm new to this list (but a long-time R-usrR). I'm considering using
> gWidgets to build (replace) an GUI for an application. A key element of
> that application is a tree structure and it looks like the gtree object
> provides the needed basic functionality.
>
> However, I need to be able to control the gtree contents from program
> elements besides keyboard and mouse events. For example, in the help pages
> for gtree, an example is given for how to display a file directory
> structure. Very cool. But, I need to know the command sequence that would
> be used to add a row to the tree or to tell the tree to "open" a node or
> "change the text color" or "close" a node or "delete" a row from the tree
> and then "update".
>
> I've looked and looked and can't see that it is even possible. If this kind
> of manipulation is not possible, then I need to use change to another
> approach that offers that capability. I would like to do this in R as it
> will be very easy to build functions that manipulate the underlying data
> structures that would be displayed with the gui.
>
> Any suggestions from this list would be welcome. Maybe I just need to
> purchase "the magic book". ... But, which magic book?
>
> Thanks for your time,
>
> Nick Crookston
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-GUI mailing list
> R-SIG-GUI@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-gui
>

        [[alternative HTML version deleted]]

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

Reply via email to