well, Herfried,
I took a data form that was an MS example that has a listbox for lookup and
nav buttons and build a nice inheritable baseform that requires little code
and allows you to override a lot of things and uses a listbox.
In this case I wanted list items to have tabs. So having to make a listview
in this case defeated the purpose, although maybe I need to make another
version that uses a listview instead.... Interesting idea.
I haven't used PInvoke yet.
What object has PInvoke for me to use to call? I assume pinvoke is used to
make a winapi call or something...unmanaged code. I was trying to come up
with some algorithm that would figure so many charachters gets a tab and
more chars less tabs and assumed 8 chars per tab but haven't gotten it to
working yet.
Thanks,
Shane
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bq*************@ID-208219.news.uni-berlin.de...
* "SStory" <Th*******@TAKETHISSPAMBUSTEROUT.Softhome.net> scripsit: Can anyone tell me what algorithm I should use to determine how many
tabs to add to a string.
I have two strings.
I want to add them to a listbox concatenated but with a tab between
them.
one tab makes them not line up as string A and B are variable length.
String A is the shortest of the 2 and the Key.
What can I do to determine how many vbTabs to put in between the strings
so they will line up?
Why not use a ListView control in details view instead?
- or -
Use PInvoke on 'SendMessage' + 'LB_SETTABSTOPS'. A VB6 sample can be
found here:
<http://www.mvps.org/vbnet/index.html?code/listapi/listrightalign.htm>
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>