|
-
Oct 7th, 2002, 04:33 AM
#1
Thread Starter
Addicted Member
list box
Hi !
how to set the list box so that it contains many fields.
for ex (2 fields):
file name Size
----------- ------
Test.exe 10k
ftp.lnk 1k
etc....
10x anyway !!
-
Oct 7th, 2002, 04:40 AM
#2
Hyperactive Member
As far as I can tell there is NO way. You should use the datagrid control to do such a thing...
This is my knowladge though...
"Experience is something you don't get until just after you need it."
-
Oct 7th, 2002, 04:48 AM
#3
Thread Starter
Addicted Member
I know, there is a way !!
i had the code ... but i dont have it anymore !!
anyway ...
-
Oct 7th, 2002, 04:56 AM
#4
Thread Starter
Addicted Member
anyone !?!?!?
-
Oct 7th, 2002, 06:23 AM
#5
Play around with this...
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_SETTABSTOPS = &H192
Private Sub Form_Load()
ReDim TabStop(0 To 2) As Long
'assign some values to the tabs for the second third and fourth
'column (the first is flush against the listbox edge)
TabStop(0) = 90
TabStop(1) = 130
TabStop(2) = 185
'clear then set the tabs
Call SendMessage(List1.hwnd, LB_SETTABSTOPS, 0&, ByVal 0&)
Call SendMessage(List1.hwnd, LB_SETTABSTOPS, 3, TabStop(0))
List1.AddItem "Big" & Chr(9) & "Brown" & Chr(9) & "Dog"
List1.AddItem "Brown" & Chr(9) & "Big" & Chr(9) & "Dog"
List1.AddItem "Dog" & Chr(9) & "Brown" & Chr(9) & "Big"
List1.Refresh
End Sub
-
Oct 7th, 2002, 06:26 AM
#6
Fanatic Member
but i have a feeling that isnt exactly what you wanted
-
Oct 7th, 2002, 09:48 AM
#7
Hyperactive Member
Re: Play around with this...
Originally posted by Hack
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_SETTABSTOPS = &H192
Private Sub Form_Load()
ReDim TabStop(0 To 2) As Long
'assign some values to the tabs for the second third and fourth
'column (the first is flush against the listbox edge)
TabStop(0) = 90
TabStop(1) = 130
TabStop(2) = 185
'clear then set the tabs
Call SendMessage(List1.hwnd, LB_SETTABSTOPS, 0&, ByVal 0&)
Call SendMessage(List1.hwnd, LB_SETTABSTOPS, 3, TabStop(0))
List1.AddItem "Big" & Chr(9) & "Brown" & Chr(9) & "Dog"
List1.AddItem "Brown" & Chr(9) & "Big" & Chr(9) & "Dog"
List1.AddItem "Dog" & Chr(9) & "Brown" & Chr(9) & "Big"
List1.Refresh
End Sub
Cool... Didn't knew that...
"Experience is something you don't get until just after you need it."
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
|