[Gtk-sharp-list] CellRenderer custom properties

MDK mdk at mdk.org.pl
Tue May 24 06:39:24 EDT 2005


Welcome,

I'm writing my own custom CellRenderer to display pixbuf with other
small pixbufs ("emblems") overlayed on it (similiar to how Nautilus
displays file icons with "emblems" in the corners). 

I managed to get all the rendering working but I have problems with GLib
custom properties. I'd like the Renderer to work like other generic
Renderers - so it can get it's data from Model fields bound to specific
attributes (TreeViewColumn.AddAttribute(..)). The problem is, I don't
know how to define my own custom properties. 

I end up with errors like:

(<unknown>:19256): GLib-GObject-WARNING **: IA__g_object_set_property:
object class `CellRendererCustom' has no property named `test'

(I'm trying to define a string property called 'test'). I know I can use
a TreeCellDataFunc function (as in progress bar example), but that's not
really "clean" and not "portable". 

I'm aware that properties are somehow defined at the GLib.Object level.
Is it possible to add (without too much acrobacy) custom properties? I
remember It is possible in gtk-mm. 

I'm also considering writing the Renderer as unmanaged C code, but this
doesn't sound good either. 

Thanks in advance, 


-- 
Michał Dominik K.
mdk at mdk.org.pl
www.mdk.org.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://galactus.ximian.com/pipermail/gtk-sharp-list/attachments/20050524/d0bed7db/attachment.bin


More information about the Gtk-sharp-list mailing list