Edithf
asked on
Listbox Horizontal Scroll
How do you add a horizontal scroll bar to a list box ?
I have only one column but the text lenght for each row is actually longer the listbox width I defined. I could not found a horizontal scroll bar function.
Vertical Scroll bar appears when the row gets bigger than the lenght of the listbox, but I cannot do that for horizontal ??
Thanks
Edith
I have only one column but the text lenght for each row is actually longer the listbox width I defined. I could not found a horizontal scroll bar function.
Vertical Scroll bar appears when the row gets bigger than the lenght of the listbox, but I cannot do that for horizontal ??
Thanks
Edith
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks it works well now ....... I always have problem looking up for the function in the Library. Does the library function include in the C++ help ?
Declare Function SendMessage Lib "user32" Alias
"SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long,
ByVal wParam As Long, lParam As Long) As Long
Const WM_USER = &H400
Const LB_SETHORIZONTALEXTENT = WM_USER + 21
Sub CheckListBox
Dim i%, res&
Dim Scrollwidth&
For i% = 0 To Form1.List1.ListCount
If Form1.TextWidth(Form1.List
Scrollwidth& = Form1.TextWidth(Form1.List
Next i%
res& = SendMessage(Form1.List1.hW
Scrollwidth&, 0&)
End Sub