Re: TreeView without a selection when rendered



Joaquim Schmidlap wrote:
Whenever I put a TreeView on a window, it appears with the top row selected. I would like it to appear initially with no rows selected, but still allow the user to make selections later.

From my experience using a tree view (not a lot, but maybe enough to point some things out), items are not selected automatically. There are methods, such as "set_cursor()" that do modify the selection, but I don't think that anything is automatically selected even after constructing and adding items to a tree view.

I've tried get_selection()->unselect_all() in both on_realize and on_show, but it doesn't work. I'm guessing whatever does the initial selection happens after those events.

This should not be necessary if you make sure that there are no calls to TreeView methods such as "set_cursor()" or setting the selection somewhere in you're code.

Is there a different event I can sneak in after to do this?

More generally, a related question: it seems there are many steps in rendering a widget: on_map, on_realize, on_show, etc. Is there a definitive list of what all these events are, and in what order they happen?
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]