Because in a Palm rectangle you must give the topLeft x-y coord, and the extents (size) of your rectangle, not the bottomRight x-y coords like you seem to be doing.

Jerome

Pete Dempsey wrote:
Hi,

I have a list with a custom draw function where I draw a checkbox for each 
item. I am trying to detect when a checkbox is clicked as opposed to the list 
item. But I am having problems as for some reason the RctPtInRectangle function 
seems to return true for each checkbox in the list.

E.G. the list has 3 three checkboxes, the third one is clicked and the 
RctPtInRectangle function is called three times with the following paramters:

RctPtInRectangle(16, 87, rect(12, 60, 19, 71)) -> returns true
RctPtInRectangle(16, 87, rect(12, 71, 19, 82)) -> returns true
RctPtInRectangle(16, 87, rect(12, 82, 19, 93)) -> returns true

I can't understand why the first 2 calls are returning true. Anybody know why?


--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to