Link to home
Create AccountLog in
Avatar of Ofer Leshem
Ofer LeshemFlag for Israel

asked on

Dephi selection area

I need to give users the ability to select some area of a picture inside my Delphi application (i.e. draw selection area on the picture)

What is the best way to do it ?
Avatar of jimyX

Generally, you record the x,y coordinates in the mousedown and mouseup events.  These constitute two opposite corners of a rectangle.

You can enhance the UI by 'overlaying' the current rectangle over the picture in the mousemove event (if the left mouse button is depressed, of course)
Avatar of rfwoolf
Flag of South Africa image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
@rfwoolf: Me likey