Board index » delphi » How to Right Align text in TStringGrid?

How to Right Align text in TStringGrid?

Hi:

In a TStringGrid, how do I set text in some columns to Left Align and
text in others to Right Align? By default, they are all Left Aligned.

Your help would be appreciated.

Blair Kingsland
bla...@tigron.com

 

Re:How to Right Align text in TStringGrid?


Quote
Blair Kingsland <bla...@tigron.com> wrote:
> In a TStringGrid, how do I set text in some columns to Left Align and
> text in others to Right Align? By default, they are all Left Aligned.

Use the OnDrawCell event to provide your own drawing method, or take the
easy path and use one of the many enhanced stringgrid components available
on the web. e.g. my TStringAlignGrid (freeware, full source, all Delphi
versions) - the name already tells that it has exactly that feature. You
can find it on my homepage or the several Delphi components websites.

Bye,
   Andy

--
Andreas Hoerstemeier
  email: a...@scp.de          (work)
         a...@hoerstemeier.de (home)
  www:   http://www.hoerstemeier.com

Other Threads