On Fri, 26 May 2000, Joshua D. Boyd wrote:
> Does anyone have any examples of programs that use the CTree? I'm trying
> to write one that does, but it's giving me trouble appending nodes to the
> tree. I've looked at the regular gtk documentation, but it isn't helping.
> Here is what I'm currently doing:
>
> MyTree = GtkCTree ()
> MyNewItem = GtkTreeItem ("Test")
> window.add(MyTree)
> MyTree.show()
> MyTree.append (MyNewItem)
For the GtkCTree, you don't use GtkTree of GtkTreeItem widgets. Instead,
you create the items in the tree with the insert_node method.
tree = gtk.GtkCTree(1, 0)
node1 = tree.insert_node(None, None, ['an item'])
node2 = tree.insert_node(None, None, ['another item'])
node3 = tree.insert_node(node2, None, ['a subitem'])
node4 = tree.insert_node(node2, node3, ['another subitem'])
>
> I get the error from the MyTree.append line.
> --
> Joshua Boyd
> http://catpro.dragonfire.net/joshua
>
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
-
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]