[Gtk-sharp-list] How to highlight the first

Brad Taylor brad at getcoded.net
Mon Jul 3 19:52:14 EDT 2006


> I'm trying to highlight the first row of a TreeView. I tried several
> variations around this ode, but none of them has any effect:

Probably the best way to do this is the following:

TreeIter iter;
if (your_model.GetIterFirst (out iter)) {
	your_treeview.Selection.SelectIter (iter);

This allows for the case when there is no first iter (empty model).  It
will also work in the TreeStore and ListStore case.

Hope this helps.


Brad Taylor
Genome Software LLC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20060703/cefdbccf/attachment.bin 

More information about the Gtk-sharp-list mailing list