Ruby Forum Ruby-Gnome 2 > Nested TreeView

Posted by Bryan Richardson (btrichardson)
on 07.08.2008 04:39
Hello all,

Is it possible to have nested TreeViews/TreeStores?  I'm trying to
extend RSQLiteGUI to display relational associations and I'm wondering
how I can do this with TreeView...

--
Thanks!
Bryan
Posted by Kouhei Sutou (Guest)
on 07.08.2008 13:24
(Received via mailing list)
Hi,

In <dc81fe936627fe284aa14984642958ee@ruby-forum.com>
  "[ruby-gnome2-devel-en] Nested TreeView" on Thu, 7 Aug 2008 04:39:07 
+0200,
  Bryan Richardson <ruby-forum-incoming@andreas-s.net> wrote:

> Is it possible to have nested TreeViews/TreeStores?  I'm trying to
> extend RSQLiteGUI to display relational associations and I'm wondering
> how I can do this with TreeView...

Did you see 'Tree View/Tree Store' sample in
gtk/sample/gtk-demo/main.rb sample program? Is it what you
want?

Thanks,
--
kou
Posted by Bryan Richardson (btrichardson)
on 07.08.2008 14:12
Hi Kou,

Wow, I did not know that demo existed... that will be very useful to me 
in the future, thanks!  Now, to answer your question: The TreeStore 
example in the demo is not exactly what I was looking for.  I'd like to 
have nested TreeStores if possible.  So, for example, let's say I have a 
table in a database that has a column for its id, a column for its name, 
and a column for its value.  Then lets say I have another table that has 
a column for its id, a column for the id of the row in the other table 
it belongs to, its name, and its value.  Thus the second table belongs 
to the first table, and the first table has many second tables.  In the 
TreeStore, if the first table has some rows in the second table that 
belong to it, I'd like to be able to expand it out so that a whole new 
TreeStore is shown for the rows in the second table.  Very similar to 
what the ActiveScaffold Ruby on Rails plugin does if you've ever seen 
that demo.

--
Thanks!
Bryan

Kouhei Sutou wrote:
> Did you see 'Tree View/Tree Store' sample in
> gtk/sample/gtk-demo/main.rb sample program? Is it what you
> want?
> 
 Thanks,
> --
> kou
Posted by Marc Heiler (shevegen)
on 09.08.2008 12:15
> Wow, I did not know that demo existed

The demos helped me a LOT. At this point I want to chime in and express 
my personal thanks to everyone who helped create these demos. They are 
very useful.