On Sun, Mar 07, 2010 at 08:30:16PM +0200, Max Usachev wrote:
 
> > > I use TouchSelector with
> > > hildon.TOUCH_SELECTOR_SELECTION_MODE_MULTIPLE mode to select
> > > multiple items, but I can't find way to select necessary items
> > > (for example, the first and the fourth) at startup (when
> > > TouchSelector shows).
> >
> > Use hildon_touch_selector_select_iter()
> >  
> Thanks! Can you show a little example how to use this method?

Here's an example (in C).

Berto
void
select_items (HildonTouchSelector *selector)
{
  GtkTreeModel *model;
  GtkTreeIter iter;

  model = hildon_touch_selector_get_model (selector, 0);
  gtk_tree_model_get_iter_first (model, &iter);

  hildon_touch_selector_unselect_all (selector, 0);

  gtk_tree_model_iter_nth_child (model, &iter, NULL, 1);
  hildon_touch_selector_select_iter (selector, 0, &iter, FALSE);

  gtk_tree_model_iter_nth_child (model, &iter, NULL, 3);
  hildon_touch_selector_select_iter (selector, 0, &iter, FALSE);

  gtk_tree_model_iter_nth_child (model, &iter, NULL, 4);
  hildon_touch_selector_select_iter (selector, 0, &iter, FALSE);
}
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to