[maemo-developers] HildonTouchSelector
From: Aniello Del Sorbo anidel at gmail.comDate: Fri Apr 9 04:11:15 EEST 2010
- Previous message: j2me
- Next message: HildonTouchSelector
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
just a note.
HildonTouchSelector has methods to append/prepend items but none to
remove them.
GTK does.
Anyway.. no idea why Hildon does not provide it, but if you ever want to
remove a particular row from a HildonTouchSelector this is a starting
point (of course it's very raw):
/* Assuming you want to remove row "0" or column "0" */
> GtkTreeModel *model;
> GtkTreePath *path;
> GtkTreeIter iter;
>
> /* Get the tree model of column 0 */
> model = hildon_touch_selector_get_model (HILDON_TOUCH_SELECTOR(layerbox), 0);
>
> /* Get the path to row 0 */
> path = gtk_tree_path_new_from_string ("0");
>
> /* Get the tree iter for that path */
> gtk_tree_model_get_iter (GTK_TREE_MODEL (model),
> &iter, path);
>
> /* Do not need path anymore */
> gtk_tree_path_free (path);
>
> /* Finally remove the entry from the list */
> gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
>
Hope this helps someone.
Aniello
- Previous message: j2me
- Next message: HildonTouchSelector
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
