Board index » delphi » TListBox with horizontal ScrollBar

TListBox with horizontal ScrollBar

Hi folks

I want to create a Listbox with horizontal and vertical Scrollbar.

The vertical Scrollbar is automatic but what's about the horizontal.
How can I manage it ?

I've tried it with CreateParams and set Params.Style to Style OR
WS_HSCROLL , but that does'nt work .

For any help I thank you

Bye

Klaus

 

Re:TListBox with horizontal ScrollBar


In article <31CB204B.2...@abo.rhein-zeitung.de>, ros...@abo.rhein-zeitung.de
says...

Quote

>Hi folks

>I want to create a Listbox with horizontal and vertical Scrollbar.

>The vertical Scrollbar is automatic but what's about the horizontal.
>How can I manage it ?

>I've tried it with CreateParams and set Params.Style to Style OR
>WS_HSCROLL , but that does'nt work .

>For any help I thank you

>Bye

Assuming your lisbox is listbox1 the following API will
do the trick -

SendMessage(Listbox1.handle, LB_SETHORIZONTALEXTANT,1000, LongInt(0));

The 1000 is the amount of scroll in pixels.

Brian

Re:TListBox with horizontal ScrollBar


Quote
Klaus Staudt (ros...@abo.rhein-zeitung.de) wrote:

 >> Hi folks

 >> I want to create a Listbox with horizontal and vertical Scrollbar.

 >> The vertical Scrollbar is automatic but what's about the horizontal.
 >> How can I manage it ?

 >> I've tried it with CreateParams and set Params.Style to Style OR
 >> WS_HSCROLL , but that does'nt work .

 >> For any help I thank you

 >> Bye

 >> Klaus

What abou sending to listbox an API message LB_SETHORIZONTALEXTENT ?
Does it works ?

Jerzy
 --------------------------------------------------------------
| Centrum Komputerowe VADIM                                    |
| ul. Kupiecka 28                                              |
| Zielona Gora 65-426 POLAND                                   |
| tel/fax:(+68)26-56-72;(+68)27-07-05; POLPAK(X.121) 16859013  |
| e-mail: va...@elmo.nask.waw.pl                               |
| from: Jerzy A.Radzimowski                                    |
 --------------------------------------------------------------

Other Threads