Pajak, Tom (GE Healthcare) wrote:
Hello,
I was wondering if there was a way of cancelling a deselection in the wxListCtrl in report mode.
Here is the problem:
Lets say there are four elements in the list, and lots of empty space after)
A selection has been made in a wxListCtrl.
A user selects in the list but not on any element but on the empty space. By default the wxListCtrl deselects the current selection.
I wish the wxListCtrl to detect that it has been clicked on but that no valid element was choosen, and then keep the last selection.
One way to do this is to catch the mouse button down event, use HitTest to see if the position is over a valid item or nor, and if not "eat" the event. (IOW, don't call event.Skip())
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!