Daniel Vanderwel a �crit : > I have a question regarding selecting a checkbox in a list-box. > > I've successfully created a checkbox within a listbox callback function, and > i'm wondering if it's possible to select the checkbox individually from the > rest of the row. > > It seems to me that this is impossible since I'm basically drawing the > checkbox using a special character font. Is there any way to determine if a > mouse click is over the check box as opposed to the rest of the row, or do I > have to use tables for this?
You'll have to intercept penDownEvents in your form event handler, determine if they fall inside the list bound (obtained with FrmGetObjectBounds), if so, if they're over the checkbox column, and act accordingly. In order to have your pseudo-checkbox act like a normal one, you would have to toggle its visible status and then loop with EvtGetPen until the pen is up, determine if the pen was still in the checkbox when it was lifted and then only toggle its internal state. -- Luc Le Blanc -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
