Hi,
I have to use TScrollbar on a TScrollBox(Yes,it seems bad idea,but I have to) that scrolls the box.
This is what I did:I added the scroll on the box ,used Top and Bottom anchors to keep it on track and added this code in the OnScroll event of the ScrollBar:
procedure TForm1.ScrollBar1Scroll(Sender: TObject;
ScrollCode: TScrollCode;
var ScrollPos: Integer);
begin
ScrollBox1.ScrollBy(0,-scrollPos);
end;
It's not working properly.Always scrolls down.How to make it scroll normally?
EDIT: Please do not suggest using the bars from TScrollBox,I have to use a TScrollBar.
Thank you!