How to scroll the Scrollbox by .Perform() or SendMessage if Scrollbar.visible := False?

StackOverflow https://stackoverflow.com/questions/9272220

  •  29-04-2021
  •  | 
  •  

سؤال

I have observed that when you hide the Horizontal Scrollbar, it will not scroll when using the

sbxStudyBtnHolder.Perform(WM_HSCROLL, SB_LINEDOWN, 0);

how can we make it possible?

هل كانت مفيدة؟

المحلول

You can still scroll it using ScrollBy:

ScrollBox1.ScrollBy(-8, 0);

or

ScrollBox1.ScrollBy(-ScrollBox1.HorzScrollBar.Increment, 0);

نصائح أخرى

You can't be back scrolling after this. Try this:

ScrollBox1.ScrollInView(panel[n]);

panel[n] is the TControl you like to see.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top