[Lazarus] TStringGrid Orientation
Jürgen Hestermann
juergen.hestermann at gmx.de
Sat Aug 11 16:40:43 CEST 2012
I am struggling with a 90 degree text output in a TStringGrid cell.
So far I have got it working with the following OnPrepareCanvas event procedure:
-------------------------------------------------
procedure TForm1.GridPrepareCanvas(Sender : TObject; aCol,aRow : Integer; aState : TGridDrawState);
begin // TForm1.GridPrepareCanvas
if (aCol=0) and ((aRow mod 5)=0) then
begin
with StringGrid1, Canvas, Font do
begin
Orientation := 900;
Brush.Color := clGray;
Color := clYellow;
end;
end;
end; // TForm1.GridPrepareCanvas
-------------------------------------------------
but there is lots of (unnecessary) white space before and after the text as shown in
http://image-upload.de/image/es9ThD/cf9fc08cfd.png
Any ideas how to avoid this?
More information about the Lazarus
mailing list