Hi,

I show a bitmap in my application that is composed by some irregular forms. I'd like to enable an user to select the operation to perform by clicking in one of these forms. For example, let's say I show a simple picture of a computer, where there is a monitor, a keyboard, the CPU, a mouse, etc. If the user clicks on the part of the image that represents the mouse, I'd like to open a form with information about a mouse, if it clicks the monitor, show a form with information about a monitor, etc.
Does anyone knows an easy way to do this? When the user clicks in a given point in the screen, I only have its coordinates, but how can I associate them with an object within the picture? I can imagine two solutions, but none of them seems good to me:


1. Associate each component of the picture with some well defined forms, as rectangles, and verify if the clicked point is within one of them. I'll probably be hard (or at least boring) to implement and the results would be rough.
2. Draw each component with a different color (even if only slightly different); getting the color of the clicked point, it would be easy to associate with the component. The problem is: how to make this work with monochromatic devices?


   Thanks in advance for any comments.

   Luciano Stertz



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

Reply via email to