On Fri, Feb 25, 2000 at 08:59:15PM +0200, Moshe Zadka wrote:
> I've been trying to play a bit with GtkCTree, and I can't seem
> to get anything useful out of it. Does anyone have small
> sample code which displays a GtkCTree?

this is off the top of my head, but it should be close to
something functional for creating a GtkCTree:

gct = GtkCTree()
r =  gct.insert_node(None,None,'root'  ,is_leaf=FALSE)
n2 = gct.insert_node(r,   None,'node 2',is_leaf=FALSE)
n1 = gct.insert_node(r,   n2,  'node 1',is_leaf=FALSE)
ld = gct.insert_node(n2,  None,'leaf d',is_leaf=TRUE)
lc = gct.insert_node(n2,  ld,  'leaf c',is_leaf=TRUE)
lb = gct.insert_node(n1,  None,'leaf d',is_leaf=TRUE)
la = gct.insert_node(n1,  lb,  'leaf c',is_leaf=TRUE)

The things to pay attention to are the parent/sibling
relationships, which are explained in the GTK+ API docs.

-- 
Brandt
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to