On Wed, 14 Nov 2001 16:47:08 -0200 (BRST)
"Christian Robottom Reis" <[EMAIL PROTECTED]> wrote:

> On Wed, 14 Nov 2001, Jon Nelson wrote:
> 
> > Is it possible to add checkboxes to CTree nodes?
> > What I want looks like this:
> >
> > + blah blah
> >   | some more text         X checkbox  0 unchecked_box
> 
> Not with the CTree you can't. I think the TreeView widget in
gtk2 might be
> better, but i know right now you can't.
> 
> If using Gnome and GAL is an option, You might want to try and
check out
> GAL for that; IIRC you can add any widget you like to the
ETable, but as
> always IMBW. Johan?

At this time it isn't -- I am bound to pygtk 0.6.8 and python
1.5.2
Sorry. :-(

I'm on to another attempt -- this code doesn't work (it's run
at program startup):

  im = GdkImlib.Image("test.gif")
  im.render ()
  (pixmap, mask) = im.get_pixmap()
  
  im = GdkImlib.Image("test2.gif")
  im.render ()
  (pixmap2, mask2) = im.get_pixmap()
  
  ctree = wtree.get_widget('ctree1')
  ctree.set_expander_style(GTK.CTREE_EXPANDER_TRIANGLE)

  one = ctree.insert_node(None, None, ["foo","",""],
    is_leaf=gtk.FALSE, expanded=gtk.TRUE)
  two = ctree.insert_node(one, None, ["foo2","bar2","baz2"])

  ctree.node_set_pixmap(two, 2, pixmap, mask)
  three = ctree.insert_node(one, None, ["foo3","bar3","baz3"])

It dies on the node_set_pixmap part with:
...
  File "/usr/lib/python1.5/site-packages/gtk.py", line 1407, in
node_set_pixmap
    _gtk.gtk_ctree_node_set_pixmap(self._o, node, col,
pixmap,mask)
TypeError: gtk_ctree_node_set_pixmap, argument 5: expected
GdkWindow, None found

Dang!  What gives?
-- 
Jon Nelson                \|/ ____ \|/   Gort,
[EMAIL PROTECTED]    "@'/ ,. \`@"   Klaatu
C and Python Programmer   /_| \__/ |_\   barada
Motorcycle Enthusiast        \__U_/      nikto.
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to