No such type.... Re: [Java-gnome-developer] Tree-Widget with Pixmaps at the nodes?
Brought to you by:
afcowie
From: Linuxhippy <lin...@we...> - 2002-12-05 19:19:50
|
Hi! I´ve read alle the examples, and wow, this widget isnt easy. My problem is, that I need to create a TreeStore with Objects defined in Class Type... But which Object is an Image? - Is it O.K. to use a Image, I dindt find any useful Pixbuf-stuff I tried it with several types, but I only became this: (java-gnome:1653): Gtk-WARNING **: gtktreestore.c:801: Unable to convert from gpointer to GObject I´m really frustrated, I want to learn Java-GTK, but some parts are so counterintuitive, I dont really understand this widget.. Has anybody already written an app using images in Treeview? Some sourcecode would help extremly.... Sorry, but I really, really read very much documentation... thx Linuxhippy It only says >On Tue, 2002-12-03 at 15:11, Clemens Eisserer wrote: > > >>Hi there! >> >>Please excuse that I´m asking so much, but I really didnt find a solution. >> >> >No problem. We'll help wherever possible & I'm sure other readers of >this list are glad to hear such advice. > > > >>A want to create a Tree-Widget wich has a pixmap at its node. >> >> > >Look at src/example/gtk/tree/TreeExample. > >You can add multiple renderers to each column (as is done in the first >column of the example). If the first one you add is a >CellRendererPixbuf, then you should get your desired effect. > >You will have to (for now) store the names of the image to be displayed >at each node in one of the data blocks of the treestore and map this to >the renderer in the column using something like >myTreeColumn.addAttributeMapping( myPixbufRenderer, >CellRendererPixBuf.Attibute.PIXBUF, 1) > > > > >>PUH this widget is complex and a little bit contraintuitive..... >> >> >... but also very powerful. We should, probably, create more simple >wrapper classes, like SimpleList. > > > |