[Gtk-sharp-list] [Newbie] TreeViewColumn.AddAttribute question
Michael Hutchinson
m.j.hutchinson at gmail.com
Thu Sep 27 08:49:01 EDT 2007
On 9/20/07, Stephen Erickson <serickson at isillc.com> wrote:
> I've got a TreeViewColumn, call it tvc, along with its renderer, call it
> r
>
> When I do tvc.AddAttribute(r,<i>string</i>,<i>int</i>), the
> documentation is most unhelpful with what the string parameter named
> attribute does and what valid values for it exist.
>
> All of the example I find only have the hard-coded string literal "text"
>
> So my questions are:
>
> 1. What does that parameter do?
> 2. What are the other valid values for it?
Each attribute-name->store-column-no binding sets a GTK property on
the cell renderer from a column in the store (which doesn't have to
correspond to a column in the view, BTW).
The valid names depend on the cell renderer. You can look the names up
in the GTK+ docs... or if you look at cell renderer properties in
MonoDoc, you will find that these properties have
GLib.PropertyAttribute applied, e.g. CellRenderer.Sensitive has
[GLib.Property("sensitive")], so you could bind that property with the
"sensitive" name, etc.
--
Michael Hutchinson
http://mjhutchinson.com
More information about the Gtk-sharp-list
mailing list