[Gtk-sharp-list] CellRenderer custom properties

Dan Winship danw at novell.com
Tue May 24 10:13:55 EDT 2005


On Tue, 2005-05-24 at 12:39 +0200, MDK wrote:
> 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. 

It is not currently possible, but I've added some notes to
http://bugzilla.ximian.com/show_bug.cgi?id=70061 pointing out this use
case, with some ideas on how it could be implemented.

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

If you can't do what you need to do with TreeCellDataFuncs, then writing
the renderer in C (and binding it with gapi) might be your best bet,
unfortunately. Another possibility would be to just use a little bit of
C (or p/invoking) to call g_object_class_install_property() and override
GObject.get_property() on your class. (Look at gtkcellrendererpixbuf.c
etc in the gtk sources for details.)

-- Dan




More information about the Gtk-sharp-list mailing list