Combination of TreeGadget and ListViewGadget

Linux specific forum
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Combination of TreeGadget and ListViewGadget

Post 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.
Image Image
freak
PureBasic Team
PureBasic Team
Posts: 5946
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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...
quidquid Latine dictum sit altum videtur
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

I hope that :)
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Post by WishMaster »

Can't I use the PB commands combined with some GTK API?
Image Image
freak
PureBasic Team
PureBasic Team
Posts: 5946
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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.
quidquid Latine dictum sit altum videtur
Post Reply