[Gtk-sharp-list] What I've to do to register property to my custom cell Render? public class CustomCellRenderer : CellRenderer { /// My Properties public int Status { get { return(this.status ); } set { this.status = value; } } } treeView = TreeView(...); treeView.Ap

Mike Kestner mkestner at novell.com
Tue Jan 2 12:53:04 EST 2007


On Sun, 2006-12-31 at 15:47 +0100, Matteo Bertozzi wrote:
> What I've to do to register property to my custom cell Render?
> 
> public class CustomCellRenderer : CellRenderer {
>          /// My Properties
>          public int Status {
>               get { return(this.status ); }
>               set { this.status = value; }
>          }
> }
> 
> 
> treeView = TreeView(...);
> treeView.AppendColumn("Status", new CustomCellRenderer(), "status",
> 0);
> 
>  GLib-GObject-WARNING **: IA__g_object_set_property: object class
> `__gtksharp_14_CustomCellRender 
> er' has no property named `status'

This is not currently possible.  Managed properties are not registered
with the native gobject system.  It's possible we could add an attribute
to markup a property to force registration.  It's unlikely that we would
want to universally register all managed properties.  If you feel
strongly about the feature request, you could add a wishlist bug to
bugzilla.

-- 
Mike Kestner  <mkestner at novell.com>
SUSE® Linux Enterprise 10
Your Linux is ready™
www.novell.com/linux



More information about the Gtk-sharp-list mailing list