Re: [pygtk] CTree silly question
On Tue, 5 Sep 2000, Alexandre Fayolle wrote: > How can I get the parent of a node in a CTree ? > I want to insert a node as a sibling of the node that's been clicked, but > tree.insert_node cannot take a None parameter for the parent and a > non-None parameter for the sibling (I get Gtk-CRITICAL **: file > gtkctree.c: line 3644 (gtk_ctree_insert_node): assertion `GTK_CTREE_ROW > (sibling)->parent == parent' failed.). > > Using Gtk, I would be able to use the GTK_TREE_ROW to get the row from the > node, and then look at the parent field of the row. Is there somethoing > similar in pygtk somewhere ? (even if it's an ugly workaround, I'm > interested...) parent = node.parent There are descriptions of most of the types that are defined in the C part of pygtk in the description.py file included in the tarball. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] Style and scroll bar problems
Hello I've got two questions: 1. Is it possible to change the style property bg_pixmap with widget.set_style()? When I try this, Python complains that bg_pixmap can only take a GdkPixmap as value. Is pix in the following line not a GdkPixmap? pix, mask = create_pixmap_from_xpm(win, None, "pixmap.xpm") >>> print pix Python says it is one... 2. I have a code like the following: (...) hbox = GtkHBox(FALSE, 0) hbox.show() # create the iconbox as a GtkLayout self.iconbox = GtkLayout() self.iconbox.show() # create the scrollbar adj = GtkAdjustment() self.iconbox.set_vadjustment(adj) scrbar = GtkVScrollbar(adj) scrbar.show() hbox.pack_start(self.iconbox, TRUE, TRUE, 0) hbox.pack_end(scrbar, FALSE, FALSE, 0) (...) The problem is that i can use the scroll bar perfectly well to scroll the GtkLayout, but I cannot use its arrow buttons (no response), I can only drag the bar. What did I do wrong??? Martin Grimme ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] CTree silly question
How can I get the parent of a node in a CTree ? I want to insert a node as a sibling of the node that's been clicked, but tree.insert_node cannot take a None parameter for the parent and a non-None parameter for the sibling (I get Gtk-CRITICAL **: file gtkctree.c: line 3644 (gtk_ctree_insert_node): assertion `GTK_CTREE_ROW (sibling)->parent == parent' failed.). Using Gtk, I would be able to use the GTK_TREE_ROW to get the row from the node, and then look at the parent field of the row. Is there somethoing similar in pygtk somewhere ? (even if it's an ugly workaround, I'm interested...) -- Alexandre Fayolle Logilab ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk