Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tscrollbox coordinates

Status
Not open for further replies.

enonod

Programmer
Jan 7, 2005
22
GB
I have a TScrollBox with attached control canvas.
I draw graphic controls and when scrolled, their left coordinate shows the amount of movement as negative as expected.
When I draw lines and retain the coordinates of the start position these of course do not update and it requires that I manually update each by subtracting the scroll amount because the canvas moves but the scrollbox window always has the same coordinates (and is stationary) starting at zero. This is tedious and prone to error.
Is there any way that the scrollbox window coordinates can be made to change as scrolled, i.e. move the window instead of the canvas?

Thanks
Enonod
 

You might try putting a TImage in the scroll box, and then use the canvas from the TImage.

 
Thank you Zathras I will give it a try
Regards
enonod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top