Board index » delphi » tListBox scrollbar

tListBox scrollbar

Hi,

How can I move the scrollbar in tListBox programatically?

Thanks,
R. Campbell

 

Re:tListBox scrollbar


I pulled this from the Delphi help file...
TListBox does have this procedure...

procedure ScrollBy(DeltaX, DeltaY: Integer);

Description

Call ScrollBy to scroll the contents within the control. While ScrollBy
can be used for any windowed control, it makes the most sense to use it
for descendents of TScrollingWinControl.
Applications seldom need to call the ScrollBy method unless they
implement their own scrolling interface rather than relying on a scroll
bar.
The DeltaX parameter is the change in pixels along the X axis. A
positive DeltaX value scrolls the contents to the right; a negative
value scrolls the contents to the left. The DeltaY parameter is the
change in pixels along the Y axis. A positive DeltaY value scrolls the
contents down; a negative value scrolls the contents up.

Quote
Rusty Campbell wrote:

> Hi,

> How can I move the scrollbar in tListBox programatically?

> Thanks,
> R. Campbell

--
-----------------------
Charles Conklin
cconk...@hq.navfac.navy.mil (work)
z...@mnsinc.com (home)

Re:tListBox scrollbar


Quote
In article <34fde4a4.9512...@forums.borland.com>, Rusty Campbell wrote:
> How can I move the scrollbar in tListBox programatically?

Rusty,

if you want to do that independently of the selected item (you could juts
set ItemIndex for that), send WM_VSCROLL messages to the control or use the
API function SetScrollPos.

Peter Below (TeamB)  100113.1...@compuserve.com)

Other Threads