How do i make a listbox with multiple colums??
Printable View
How do i make a listbox with multiple colums??
Not really sure, but it might be easier to use a Listview control, instead.
:)
Search this forum for Setting Tabstops in ListBox Control...
i cant use that though it doesnt help me. I want something that i can display from left to right not top to bottum. and is it possible to list something like a file in a list box then in another list box put the files size but on the same line like
That is what Tans in A listbox does it aligns the seconds "column" in the listbox. I'll find an example...
Didn't take long...
Code:
' windows messaging
Private Declare Function SendMessageArray Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, lParam As Any) As Long
Const LB_SETTABSTOPS = &H192 ' set tabs in listbox
Sub SetListBoxTabs() ' set two listbox tabstops 55 & 300
Dim TabStop(0 To 1) As Long
TabStop(0) = 55
TabStop(1) = 300
'clear tabs
Call SendMessageArray(List1.hwnd, LB_SETTABSTOPS, 0&, ByVal 0&)
' set tabs
Call SendMessageArray(List1.hwnd, LB_SETTABSTOPS, 2, TabStop(0))
DoEvents
List1.Refresh
End Sub