[gtkmm] refTreeSelection->select(iter);
- From: "danny van elsen" <danny_van_elsen hotmail com>
- To: gtkmm-list gnome org
- Subject: [gtkmm] refTreeSelection->select(iter);
- Date: Sat, 03 May 2003 23:08:19 +0200
hello all,
does selecting a row in a treeview really work? I can scroll to a row, but
selecting it just doesn't work...
I have a treeview in which each row can have children that refer to another
row. Can anyone point to what I'm doing wrong when trying to scroll to the
referenced row when double clicked:
//////////////////////////////////////////////////
refTreeSelection = gui_tv->get_selection();
// which row was double clicked?
iter = refTreeSelection->get_selected();
if (!iter) {return;} // If nothing is selected
row = *iter;
//some code that finds which row we want to scroll to
...
i = row[gui_dc->col_offset];
...
// the row that contains the reference is the beginpoint of the search //
for the referenced row
iter = row.parent();
row = *iter;
// code that finds the row pointed to
while ((... some condition with regard to i...))
{ iter++; row = *iter; }
p = gui_ts->get_path(iter);
// this works
gui_tv->scroll_to_row(p, 0.5);
// but this doesn't, either with or without the first line
refTreeSelection = gui_tv->get_selection();
refTreeSelection->select(iter);
/////////////////////////////////////////////////////////
thanks in advance!
Danny.
_________________________________________________________________
Chat with your online buddies with MSN Messenger http://messenger.msn.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]