Page 1 of 1
Combination of TreeGadget and ListViewGadget
Posted: Thu Oct 26, 2006 9:50 pm
by WishMaster
I wonder how something like this (link inside) is possible with PureBasic.
AFAIK TreeGadget and ListviewGadget have the same GTK base, so there should be a way to use the PB gadgets as a "base" and also to use PB commands (like AddGadgetItem()) to control them.
Posted: Thu Oct 26, 2006 10:51 pm
by freak
Yes, the GtkTreeView widget is actually designed to handle a tree with columns.
I think it is easier to create your own one from scratch than trying to hack the
extra stuff into the PureBasic TreeGadget.
There is a pretty good tutorial on that widget here:
http://scentric.net/tutorial/
It looks very confusing at first, but once you understand it, its a very powerfull and flexible widget.
I have been thinking of adding this natively to PB (would be easy on linux), but
for windows i would have to write something from scratch, and i don't even know of OSX.
Who knows. Maybe someday in a future version...
Posted: Thu Oct 26, 2006 11:37 pm
by Progi1984
I hope that

Posted: Sat Oct 28, 2006 12:51 am
by WishMaster
Can't I use the PB commands combined with some GTK API?
Posted: Sat Oct 28, 2006 8:06 pm
by freak
> Can't I use the PB commands combined with some GTK API?
Maybe you could, but you'd have to re-create the undelying GtkTreeStore with exactly the
column structure needed by the TreeGadget plus whatever you want to
put in the extra columns. Then for each PB command that manipulates the
gadget content you'd have to also keep the column data for your columns up to date.
I think it is a lot easier to simply create your own one.