[Gtk-sharp-list] Getting a column from a CellRender
Daniel Kornhauser
dkor@media.mit.edu
Fri, 24 Oct 2003 11:45:05 -0400
Does somebody know how to get a column of a CellRenderer in a Callback ?
In C :
This is how you would get the column in the callback
column = g_object_get_data (G_OBJECT (cell), "column");
and
This is how it was set when the renderer was being instanced.
g_object_set_data (G_OBJECT (renderer), "column", (gint*)
ALEX_COLUMN);
The equivalent in C# looks UGLY !!!!
This is how I set the column Property
GLib.Object Ugly = (GLib.Object) rendererToggle;
Ugly.SetProperty ("column", new GLib.Value ((int) Column.Alex));
This is how I retrieve it
GLib.Object column = (GLib.Object) o;
GLib.Value columnValue = new GLib.Value();
column.GetProperty("column", columnValue);
Console.WriteLine("column", columnValue.Val);
I hope my code look offensive enough to get a quick reply :-)
Daniel.