Recent

Author Topic: TScrollBox help requires  (Read 1577 times)

JasonLugg

  • Jr. Member
  • **
  • Posts: 67
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: 6130
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.
The only true wisdom is knowing you know nothing

JasonLugg

  • Jr. Member
  • **
  • Posts: 67
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!

 

TinyPortal © 2005-2018