That's what I was looking for. Thank you for your quick response.

Peter Johanson wrote:
> On Tue, Jan 30, 2007 at 07:28:31PM +0200, Radu wrote:
  > There are basically two ways (there's a third, but it's fairly
> innefficient, so I won't bother):
> 
> 1)
> 
> TreeIter iter;
> 
> if (list.GetIterFirst (out iter)) {
>       do {
>               string s = (string)list.GetValue (iter, 1);
> 
>               if (s == "first string") {
>                       break;
>               }
>       } while (list.IterNext (ref iter));
> }
> 
> 2)
> 
> list.Foreach (new TreeModelForeachFunc (SearchForeach));
> 
> bool SearchForeach (TreeModel m, TreePath p, TreeIter i)
> {
>       string s = (string)m.GetValue (i, 1);
> 
>       if (s == "my search term") {
>               found_iter_class_field = i;
>               return true;
>       }
> 
>       return false;
> }
> 
> 
> HTH,
> 
> -pete
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to