Recent

Author Topic: Aut-Scroll ScrollBox  (Read 2874 times)

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Aut-Scroll ScrollBox
« on: July 06, 2014, 11:54:08 am »
I'm creating components at runtime inside ScrollBox, I want the ScrollBox to scroll down to the last added component, the same like Memo when we add text, it scrolls to the end. Is it possible?

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1272
Re: Aut-Scroll ScrollBox
« Reply #1 on: July 06, 2014, 12:02:41 pm »
Set Scrollbox.VertScrollbar.Positon.  I think you need to set it to Scrollbox.VertScrollBar.Range.
Lazarus Trunk/FPC latest fixes on Windows 11
  I'm getting old and stale.  Slowly getting used to git, I'll get there...

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: Aut-Scroll ScrollBox
« Reply #2 on: July 06, 2014, 12:14:33 pm »
Thanks, it works perfect. I was setting it to Size instead:

Code: [Select]
  ScrollBox1.VertScrollBar.Position:=  ScrollBox1.VertScrollBar.Range;

 

TinyPortal © 2005-2018