is there a builtin way to deselect a single item in a wxTreeCtrl
(wxTR_MULTIPLE style)?
I have some items in the tree that must not be selectable and so I want to
deselect them as soon as they are selected.
But the only thing I found is wxTreeCtrl::UnselectAll. This makes it necessary
to save all selections temporarily, then deselect all and then reselect all
previously selected items, except the not-selectable one.
As I know which Item I want to deselect something Like Unselect(item) would be
much nicer.
tia
/ch
···
--
Wieviele Mitarbeiter von Microsoft benoetigt man fuer das auswechseln
einer defekten Gluehbirne? Keine, Microsoft erklaert die Dunkelheit zum
Marktstandart.
Subject: [wxPython-users] unselect single item in wxTreeCtrl
Hi all,
is there a builtin way to deselect a single item in a wxTreeCtrl
(wxTR_MULTIPLE style)?
I have some items in the tree that must not be selectable and so I want to
deselect them as soon as they are selected.
But the only thing I found is wxTreeCtrl::UnselectAll. This makes it necessary
to save all selections temporarily, then deselect all and then reselect all
previously selected items, except the not-selectable one.
As I know which Item I want to deselect something Like Unselect(item) would be
much nicer.
tia
/ch
–
Wieviele Mitarbeiter von Microsoft benoetigt man fuer das auswechseln
einer defekten Gluehbirne? Keine, Microsoft erklaert die Dunkelheit zum
Marktstandart.
How about using an EVT_TREE_SEL_CHANGING() event & vetoing any change if the selection is not allowed.
thanks for the input! The problem is, I want to allow multiselect and "unselectable" items should
just be excluded. When I cancel the whole event, I also cancel the valid part of the multiselect, right?
/ch
···
Am 03.11.2002 um 09:41:19 schrieb Chris Munchenberg:
--
Wieviele Mitarbeiter von Microsoft benoetigt man fuer das auswechseln
einer defekten Gluehbirne? Keine, Microsoft erklaert die Dunkelheit zum
Marktstandart.
Subject: Re: [wxPython-users] unselect single item in wxTreeCtrl
Am 03.11.2002 um 09:41:19 schrieb Chris Munchenberg:
Hi Chris,
How about using an EVT_TREE_SEL_CHANGING() event & vetoing any change if the selection is not allowed.
thanks for the input! The problem is, I want to allow multiselect and “unselectable” items should
just be excluded. When I cancel the whole event, I also cancel the valid part of the multiselect, right?
/ch
–
Wieviele Mitarbeiter von Microsoft benoetigt man fuer das auswechseln
einer defekten Gluehbirne? Keine, Microsoft erklaert die Dunkelheit zum
Marktstandart.
is there a builtin way to deselect a single item in a wxTreeCtrl (wxTR_MULTIPLE style)?
I have some items in the tree that must not be selectable and so I want to deselect them as soon as they are selected.
But the only thing I found is wxTreeCtrl::UnselectAll. This makes it necessary
to save all selections temporarily, then deselect all and then reselect all
previously selected items, except the not-selectable one.
As I know which Item I want to deselect something Like Unselect(item) would be much nicer.
I don't see any other way. It seem like there should be a UnselectItem method though. Please create a request for it in the bug tracker and hopefully somebody will get to it soon.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!