* * *

Author Topic: TScrollBox help requires  (Read 551 times)

JasonLugg

  • Jr. Member
  • **
  • Posts: 55
TScrollBox help requires
« on: February 28, 2018, 01:14:10 pm »
Hi all

Thx in advance.

I have a form with a tScrollbox on it. in the scrollarea I want to draw an image to the canvas (all good so far). I want the scroll area to be quite large (5000x5000). This all works, however, I want to change the position of the scroll area during runtime but when I set the tScrollbox.VertScrollBar/HoriScrollbar.position the code crashes?

Any ideas what might cause this?


jamie

  • Hero Member
  • *****
  • Posts: 812
Re: TScrollBox help requires
« Reply #1 on: February 28, 2018, 11:12:41 pm »
What platform and show us some code where you are setting the scroll position.

JasonLugg

  • Jr. Member
  • **
  • Posts: 55
Re: TScrollBox help requires
« Reply #2 on: March 01, 2018, 11:04:53 am »
Hi All

Appreciate I should have posted code, but posted whilst on the run!

Anyhow, I was trying to set the position of the scrollbars at the end of the main Forms <OnCreate> method. This crashes?

However, setting the position later in the code works. So I can only assume that for some reason the tScrollBox is not registered/instanced fully in the OnCreate method?

Thx anyhow!

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus