Hi again. I'm following the pattern below, but can't seem to find a HitTest
that works for checklistboxes. I see one for the tree control, but not the
checklistboxes.
Is there one, and I'm missing it?
Thanks.
Tim
···
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Friday, October 03, 2003 12:08 PM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Numbered CheckBox
Tim Royal wrote:
Cool. I started this, but I'm having a bit of trouble with one small
thing. I'm using the EVT_CHECKLISTBOX event, but I can't figure out
how to determine which index of the item the event is saying got
checked/unchecked.I can get the event.EventObject(), which returns to me the
checkboxlist instance, but how do I determine what got clicked? It's
not the same as the selection, because in the checkboxlist you can
check/uncheck boxes independent of which item is actually selected.Do I have to do some hittest() call to find out which item index is
the one the event was raised from?
Yes. Catch the EVT_LEFT_DOWN event and save the mouse position and then
call event.Skip(), then when you get your checklistbox event use that
position with HitTest to find out which item was clicked.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
_________________________________________________
Scanned on 03 Oct 2003 20:08:56
Scanning by http://erado.com