Re: Highlight(activating?) a specific row in a list
- From: Emmanuele Bassi <ebassi gmail com>
- To: 999alfred comcast net
- Cc: gtk-list gnome org
- Subject: Re: Highlight(activating?) a specific row in a list
- Date: Mon, 14 May 2007 22:50:14 +0100
On Mon, 2007-05-14 at 21:26 +0000, 999alfred comcast net wrote:
>
> > you really want to use the GtkTreeSelection object:
> >
> > http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeSelection.html
> >
> > and the gtk_tree_selection_select_iter()/_path() functions.
> >
> > ciao,
> > Emmanuele.
> >
>
> I am now confused (really my normal state), and it could be because of terminology.
then you should read the GtkTreeView tutorial at:
http://scentric.net/tutorial/treeview-tutorial.html
which covers most of the basics of the GtkTreeView and GtkTreeModel API
and usage.
> Here's how I do my storage.
>
> gtk_list_store_clear(store);
> while(){
> gtk_list_store_append (store, &iter);
> // format data...
>
> gtk_list_store_set (store, &iter, 0, data, -1);
> gtk_list_store_set (store, &iter, 1, data1, -1);
> gtk_list_store_set (store, &iter, 2, data2, -1);
> } //while
you don't really want to do that, as if you do this inside an event
callback or after your application has started, it'll block the main
loop (and it's pretty much overly complicated). you can load your
GtkListStore lazily, using this pattern:
http://log.emmanuelebassi.net/documentation/lazy-loading
ciao,
Emmanuele.
--
Emmanuele Bassi, E: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]