No event when deselecting last item in tree control with wxMSW

CurieCat linfk at 163.com
Mon Nov 19 20:01:47 PST 2007




Patrick Hartling wrote:
> 
> I have run into a problem with software that I am writing using
> wxWidgets 2.6.2. I have a tree control with multi-selection enabled,
> and when I use wxMSW, there is no selection changed event generated
> when the last selected item in the tree control is deselected. If I
> have multiple items selected and deselect any one of them, then there
> is a selection changed event. The problem only occurs when there is
> one selected tree item that is then deselected, and it can be repeated
> useing the treectrl sample application. I do not see this behavior
> with wxGTK or wxMac. So far, I have only tested deselection using
> Ctrl+left click, and I do not know if the behavior is exhibited when
> the last tree item is deselected programmatically.
> 
> 

I have the same problem.

1.  The last selected item in multiple selections has a "focus box" around
it.
2.  If the focused item is deselected, it is not highlighted anymore, but
the focus is still on it. No sel change event.
3.  If another highlighted item is deselected, it is not highlighted
anymore, and the focus move to it. There is a sel change event.
4.  The focused item is considered selected, regardless of highlight state.

This behavior is annoying. Anyone has a solution?





-- 
View this message in context: http://www.nabble.com/No-event-when-deselecting-last-item-in-tree-control-with-wxMSW-tf1101626.html#a13850491
Sent from the wxWidgets - Users mailing list archive at Nabble.com.





More information about the wx-users mailing list