5

Is simple way to rotate text in stringgrid (90 and 45 degrees)? Or is there FREE component like TStringGrid with text rotation in cell?

Saboten
  • 61
  • 4
  • See [SwissDelphiCenter](http://www.swissdelphicenter.ch/en/showcode.php?id=1596) for an example (by Reinhard Schatzl) how to do this with 90 degrees rotation. – LU RD Mar 06 '12 at 13:04
  • 3
    [This Lazarus answer](http://stackoverflow.com/a/9155357/757830) shows the Delphi solution at the bottom of the post. – NGLN Mar 06 '12 at 13:09
  • Do not rotate image, draw the text rotated – OnTheFly Mar 07 '12 at 04:52

1 Answers1

1

You can use ZColorStringGrid component (free). Component have additional properties for each cells (text rotation, indent, color, alignment). Support multiline text (and can rotate multiline text) and merge cells.

Code sample:

  ZColorStringGrid1.CellStyle[0, 1].Font.Name := 'Tahoma';
  ZColorStringGrid1.CellStyle[0, 1].Font.Size := 12;
  ZColorStringGrid1.CellStyle[0, 1].Rotate := 90;
  ZColorStringGrid1.Cells[0, 1] := 'Rotate' + sLineBreak + 'text' + sLineBreak + '90 degrees';
RG_DATA
  • 11
  • 1