RE: Image Help
"Glenn B. Lawler" <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <[email protected]> |
Janice, > I would like to know if it is possible to have an image be a > clickable link. For example, have a picture of a house and when you > click on the roof, it brings up details about the roof or when you > click on the door, details about that door are displayed. If this is > possible, can someone suggest some ways that this might be > accomplished. Thank you! Check help on the OnMouseDown event. TMouseEvent = procedure (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) of object; Your event handler receives X and Y coordinates which are exactly where on the image the user clicked, the TMouseButton parameter tells you which mouse button was used, the TShiftState tells you which shift keys were held when it was clicked. Your task is to do the math that determines if the X,Y coordinate is within the portion of the object you want to correlate with a particular user selection. This list is a good source of details on exactly how to do this, but it is good experience to try to figure it out before asking for help. - Glenn Lawler ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Naturally Painless & Spray Away Backaches & Joint Pain. $19.97 http://www.challengerone.com/t/l.asp?cid=2867&lp=m331.html http://us.click.yahoo.com/tJIe0D/79VGAA/ySSFAA/i7folB/TM ---------------------------------------------------------------------~-> CodeCoffer - new Delphi code protection Tool! http://www.delphicollection.com/public/CodeCoffer.htm --------------------------------------------------------------- Unsubscribe:[email protected] List owner:[email protected] --------------------------------------------------------------- Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/