ItsMe
asked on
Auto Scroll
Hi,
I'm using a scrollbox with a TImage component. How do I make the scrollbox autoscroll to the right direction, when I arrive the Border of it ? I want that the point you are editing of the image is visible while editing. E.g. the user of my program wants to draw a rectangle. The problem is that he cannot see the size of it, when the image size is bigger than the size of the scroll box.
I'm using a scrollbox with a TImage component. How do I make the scrollbox autoscroll to the right direction, when I arrive the Border of it ? I want that the point you are editing of the image is visible while editing. E.g. the user of my program wants to draw a rectangle. The problem is that he cannot see the size of it, when the image size is bigger than the size of the scroll box.
ASKER
OK, I know the mouse Coords (the position on the image) but
how do I know if they are in the visible area of the scrollbox ?
The user klicks (holds) and pulls the mouse to draw a rectangle circle etc.
how do I know if they are in the visible area of the scrollbox ?
The user klicks (holds) and pulls the mouse to draw a rectangle circle etc.
I think it's best to check if the cursor reached the edges and going beyond them. It's hard to imagine the thing you've set up here - can you tell more, or even post the unit?
ASKER
The example from Borland (Graphex) is the same like mine.
ASKER
... the same principle ...
ASKER
Help !
Sorry...
I still haven't installed Delphi 4 (Graphex?). Post whatever you have, and explain what doesn't work. Sorry...
I still haven't installed Delphi 4 (Graphex?). Post whatever you have, and explain what doesn't work. Sorry...
Send it please to me <bosism@netvision.net.il>
ASKER
Graphex is included in Delphi 3 in the Demos\Doc\Graphex
directory. Graphex is an paint example. My problem is that
when I want to draw e.g. a rectangle which becomes bigger
than the visible part of the image the scrollbox doesn't
scroll. I need to know how I can make the scrollbox scroll
when I arrive one of her edges/borders.
directory. Graphex is an paint example. My problem is that
when I want to draw e.g. a rectangle which becomes bigger
than the visible part of the image the scrollbox doesn't
scroll. I need to know how I can make the scrollbox scroll
when I arrive one of her edges/borders.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you ! It works very well.
You can also find various image components on the Delphi pages that have built in scrolling...