JimScott
asked on
VB6 and vbTab
I am using a listbox to display a number of items separated by vbTab. The first vbTab seems to jump approx 20 spaces where subsequent ones jump approx 5 spaces.
How can I change the first vbTab to be 5 spaces also ?
Anyone any ideas ?
How can I change the first vbTab to be 5 spaces also ?
Anyone any ideas ?
Have you tried Tab(#)?
hello jimscott
you use space your problem will be solved
List1.AddItem Space(5) & "sss" & Space(5) & "cc" & Space(5) & "cc" & Space(5) & "cc" & Space(5) & "cc"
you use space your problem will be solved
List1.AddItem Space(5) & "sss" & Space(5) & "cc" & Space(5) & "cc" & Space(5) & "cc" & Space(5) & "cc"
The tab character goes from one tabstop to the next tabstop. Tabstops are set up as 8 spaces, if the first word is 8 characters, then the tab will move the next item to offset 16.
If the first word on row 2 is 3 characters then tab will move the next item to offset 8. Tab doesn't put a fixed amount of space between each item, it moves to the next tabstop. You could use your own formatting like mahesh suggests with spaces instead of tabs. Another option is to use the ListView instead of the listbox. It is designed for multiple columns and you can add items to each column as opposed to trying to format them.
If the first word on row 2 is 3 characters then tab will move the next item to offset 8. Tab doesn't put a fixed amount of space between each item, it moves to the next tabstop. You could use your own formatting like mahesh suggests with spaces instead of tabs. Another option is to use the ListView instead of the listbox. It is designed for multiple columns and you can add items to each column as opposed to trying to format them.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
From the looks of it, a typical hit and run action.
D.
From the looks of it, a typical hit and run action.
D.
Dan,
How can I object to your suggestion... ;-)
Grtz.©
D.
How can I object to your suggestion... ;-)
Grtz.©
D.