Re: tree view question / hightlighting rows
- From: Alexander Nagel <alexander acwn de>
- To: Carlos Pereira <jose carlos pereira ist utl pt>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: tree view question / hightlighting rows
- Date: Mon, 25 Jan 2010 01:09:18 +0100
Hi,
and thanks for your quick response. I have searched the archive, it
seems I just overread it. It's hard to search for something but you
don't know what to look for. Sometimes one need just a hint to the
correct function.
thanks
Alexander
Carlos Pereira schrieb:
Alexander Nagel wrote:
Hi,
i have a treeview which displays a list of filenames in one column and
other things in other columns. I can iterate successfully through the
list.
How can I highlight the current row? With "highlight" I mean that the
row looks like selected by the user.
For example, this code selects the first row, exactly as if the user had
clicked with the mouse:
GtkWidget *treeview;
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview));
gtk_tree_model_get_iter_first (model, &iter);
gtk_tree_selection_select_iter (selection, &iter);
My next question/problem then is: if the list is longer than the
current scrolledwindow, how can I autoscroll the hightlighted row is
always visible to the user?
Hope you understand what I mean.
I am almost sure this was already discussed (several times) in this
list... did you look into the arquives?
Carlos
bye
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]