BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to tell a scroll box to scroll

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc
View previous topic :: View next topic  
Author Message
Laurie Boshell
Guest





PostPosted: Sun Nov 16, 2003 10:14 am    Post subject: How to tell a scroll box to scroll Reply with quote



I have a TImage within a scroll box and the image is larger than the scroll
box so that scroll bars are present.
I have a mouse handler for TImage that tracks the cursor position within
TImage.
How do I tell the scroll box to scroll when the curson in the TImage gets
near the perimeter of the TImage (Say within 10 pixels)? Is there a message
that I can send to the scroll box?

Thanks
Laurie.


Back to top
KLinZ
Guest





PostPosted: Sun Nov 16, 2003 11:43 am    Post subject: Re: How to tell a scroll box to scroll Reply with quote



In news:3fb74e2c (AT) dnews (DOT) tpgi.com.au, Laurie Boshell typed:

Quote:
I have a TImage within a scroll box and the image is larger than the
scroll box so that scroll bars are present.
I have a mouse handler for TImage that tracks the cursor position
within TImage.
How do I tell the scroll box to scroll when the curson in the TImage
gets near the perimeter of the TImage (Say within 10 pixels)? Is
there a message that I can send to the scroll box?

You don't have to send a message. You can use the Position property of the
HorzScrollBar and VertScrollBar properties:

ScrollBox1.HorzScrollBar.Position := X;
ScrollBox1.VertScrollBar.Position := Y;

--
www.zenobits.com


Back to top
J French
Guest





PostPosted: Sun Nov 16, 2003 11:56 am    Post subject: Re: How to tell a scroll box to scroll Reply with quote



On Sun, 16 Nov 2003 21:14:59 +1100, "Laurie Boshell"
<laurie (AT) pnc (DOT) com.au> wrote:

Quote:
I have a TImage within a scroll box and the image is larger than the scroll
box so that scroll bars are present.
I have a mouse handler for TImage that tracks the cursor position within
TImage.
How do I tell the scroll box to scroll when the curson in the TImage gets
near the perimeter of the TImage (Say within 10 pixels)? Is there a message
that I can send to the scroll box?

I think you need to look at the ScrollBy method

It could be a bit tricky, you'll need to keep track of what direction
the mouse moved, and as you scroll the TImage, that will trigger
further mouse movement

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.