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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Columns in RichEdit

Status
Not open for further replies.

TheFenom

Programmer
Jan 2, 2004
2
ZA
I'm trying to write an application which uses the richedit as a sort of balance sheet. In other words I need to have two columns: one for description and one for amount like so:

Description1 $ 100.00
Description2 $ 2000.00
Description3 $ 10.00

Total $ 2110.00

As you can see the description is left align and the amount field is right aligned. I've tried using the Format funtion but that doesn't work as I am not using courier or a font like it where each font is the same size. Can anyone tell me how to do this?
 
My advice would be to use a stringgrid rather than a richedit.
You can make the lines invisible to get the sheet effect you would with the edit control, and keeping you coloums stright will not be a problem.
Its a little more difficult to load into, but worth the effort.

Steve
DNA still on the way, as is the new release of Star do we all like tabs?............
 
I second Steve's suggestion - it's really not worth the hassle using TRichEdit. If you need help loading text from file - just let us know.

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
I agree. It's easier to handle the text if it's in a grid.
...And when you hide the gridlines, and maybe the Grid borders, you can change the look of the grid completely.



KungTure-RX.jpg

//Nordlund
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top