|
-
Sep 19th, 2001, 07:32 PM
#1
Scroll Bars in ListBox Control !
Hai,
How can i set both vertical and horizontal scroll bars in a listbox control.
There isn't any property during design time. However the horizontal scroll bars works as the number of items increases but not the vertical scroll bar.
Any idea / code highly appreciated ...,
ashky.
-
Sep 19th, 2001, 07:44 PM
#2
Fanatic Member
Use the SendMessage API call with the LB_SETHORIZONTALEXTENT constant, ie......
VB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const LB_SETHORIZONTALEXTENT = &H194
Public Sub AllowHorizScroll(pList As ListBox, pTwips As Integer)
Dim iPix As Integer
iPix = pTwips \ Screen.TwipsPerPixelX
SendMessage pList.hwnd, LB_SETHORIZONTALEXTENT, iPix, &O0
End Sub
Private Sub Form_Load()
AllowHorizScroll List1, List1.Width + 1000
End Sub
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Sep 19th, 2001, 10:46 PM
#3
Thanks
Dear YoungBuck,
Thank you very much for ur reply. It worked perfectly.
ashky.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|