Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

windows Text and lining up columns

Status
Not open for further replies.

DarkAlchemist

Programmer
Jan 19, 2004
18
US
Back when all fonts were fixed at 8x8 you could use a simple formula saying if you wanted your 2nd column to line up at position 40 it was simple to for (int x = 0; x < 39; x++) print[space]

Now that we have true type fonts how do you implement that so at position 40 (regardless of the font used) column 2 will always be there? Trying the above will get you to char 40 which could be anywheres based on the chars that preceeded it.

I hope I have asked this well enough to get an answer as I am stuck.
 
I believe, in order to show a great tabulated test you should use list views instead of drawing the text manually. Use a separated list view item for each tab iteration.

Ion Filipski
1c.bmp
 
Wish I could but this is into another apps window so thats out. :/ Oh, and I am basically running ATL to boot.
 
Poor little, heh. Have a good link to read up on list views? MSDN was a bit over powering.
 
I believe there are some links like:
codeguru.com
codeproject.com

Many links find on google.com

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top