Re: [gtkmm] The TreeView blues..
- From: Daniel Elstner <daniel elstner gmx net>
- To: Kjell Irgens <kjell spacetec no>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] The TreeView blues..
- Date: 04 Dec 2002 00:03:52 +0100
Am Die, 2002-12-03 um 23.19 schrieb Kjell Irgens:
> I have a multiselect TreeView which looks simular to this when the first
> entry is expanded:
>
> V Parent text 1
> Child text 1
> Child text 2
> |> Parent text 2
> |> Parent text 3
>
> If I select one of the parent rows, I want all the child nodes under this
> to be selected automatically. This now works if the parent row already is
> expanded, otherwise not. The problem is that if I expand the parent row, all
> the children under that row appear as deselected.
>
> Also, if I unexpand a parent row where there are selected children, these
> seem to be unselected automatically. This is not what I expected would
> happen, can it be avoided?
No. That's intented behaviour. (hint: accessibility -- the current
selection should always be clearly visible)
As I understand it, you probably want to handle rows with subnodes as a
whole (like e.g. copying a directory). That's OK, and should be easy
enough to handle programatically.
> I would also like to have a popup menu when I press e.g. mouse button 3 over
> a row. I can make this work by following the description in
> http://mail.gnome.org/archives/gtkmm-list/2002-November/msg00146.html
> But I need to know the row over which the mouse button was clicked, can this
> information be found somehow?
See Gtk::TreeView::get_path_at_pos() (you need to pass the coordinates
from the event struct to this method).
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]