[Lazarus-es] stringGrid
Héctor Fiandor
hfiandor en ceniai.inf.cu
Jue Dic 10 01:20:47 CET 2015
Dear fellows<
I am trying to show a StringGrid with columns title. I have selected a
Default Width of 64, and I desire that titles appears in multiline cells.
I have read the Grids Reference Page and write the following procedure:
procedure TfBalTriDiario_2.sgTitBalTriDiario_2PrepareCanvas(sender: TObject;
aCol, aRow: Integer; aState: TGridDrawState);
var aTextStyle: TTextStyle;
begin
if (ACol>=0) and (ARow=0) then
begin
aTextStyle := sgTitBalTriDiario_2.Canvas.TextStyle;
sgTitBalTriDiario_2.Canvas.Brush.Color := clMaroon;
sgTitBalTriDiario_2.Font.Color:=clWhite;
sgTitBalTriDiario_2.Font.Bold:=true;
if (ACol=11) and (ARow=0) then aTextStyle.SingleLine := false;
if (ACol=0) and (ARow=0) then aTextStyle.Alignment:=taLeftJustify;
if (ACol in[1..11]) and (ARow=0) then
aTextStyle.Alignment:=taRightJustify;
//if (ACol in[0..11]) and (ARow=0) then aTextStyle.Layout:=tlCenter;
sgTitBalTriDiario_2.Canvas.TextStyle := aTextStyle;
end;
end;
The titles are introduced in an array of string[30].
I dont get the results. If anyone can help me, I will appreciate very
much.
Thanks in advance
Saludos,
Ing. Héctor Fiandor
hfiandor en ceniai.inf.cu
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus-es/attachments/20151209/8c7782e4/attachment.html>
More information about the Lazarus-es
mailing list