[comp.windows.ms.programmer] Aligning list box items with a header.

lwallace@javelin.es.com (Lynn Wallace) (03/06/91)

My application has a dialog that looks like:


       Name                    Char    Flag   Flag   Flag   Icon   Icon   Icon
--------------------------------------------------------------------------------
|                                                                              |
|                                                                              |                               etc...        
|                                                                              |
|                                                                              |
--------------------------------------------------------------------------------

		[button]	[button]	[button]


What we have is a static text control, three icon controls, followed by a
generic list box with scrolling, followed by some buttons.

Items under Name will be up to 30 chars, Char is one character, Flag's are a 
a check mark or a blank, and I want to display integers under the Icon's.

Assuming the system font will change, and my current font is proportional
anyway, what is the way to have the text in this list box stay neat? 
(Currently I've brute-forced my way through setting tabs and printing spaces and
leading zeros until it aligns.  Neither efficient nor fun.)

Thanks in advance!
-- 
Lynn Wallace			   |I am not an official representative of
Evans and Sutherland Computer Corp.| <- E&S.  Or for that matter, unofficial.
Salt Lake City, UT 84108	   |Internet: lwallace@javelin.sim.es.com
			War not make one great! -- Yoda