Here's a Windows dev newbie question.  I'm use to working in DOS with a
fixed size font.
I'm using a Listbox to list 2 column's of data.
{I could use a StringGrid but I don't need all the added functionality &
it adds an extra 50k to the size of the EXE.  I like to keep things as
simple as possible.}
This is done by setting the TabWidth property & separating the 2 fields
with a tab (^I).  It works well except when the first field exceeds the
length of the TabWidth, whereby it moves the 2nd field another TabWidth
to the right.  I would like to truncate the first field before it
exceeds the tab length, but is there any easy way to calculate the
physical length of a string of characters?  I'm guessing not, without
knowing each characters width.

I have a similar problem with a listbox where I want to store a list of
numbers right-justified.  I tried the Format function to force the Width
but it only works with a fixed size font.  I've been forced to use the
'precision' option to add leading zeroes to the numbers which looks
ugly.  What is the standard way to do this?

Cheers,
Ross.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to