Glen Morse
Glen Morse

Reputation: 2593

How to make TScrollingWinControl scroll

I have a custom component (TScrollingWinControl). But the scroll bars never appare, how do you show scroll bars on this component? Do you have to create a procedure to read them in or are they all ready there?

Upvotes: 2

Views: 428

Answers (1)

Sertac Akyuz
Sertac Akyuz

Reputation: 54772

You give a Range that is longer than the control's client width/height. To scroll, you can set its position. Eg:

HorzScrollBar.Range := ClientWidth * 2;
HorzScrollBar.Position := HorzScrollBar.Range - ClientWidth;

Upvotes: 4

Related Questions