[Lazarus-es] stringGrid

francisco prieto fajprieto en gmail.com
Jue Dic 10 11:26:49 CET 2015


Hector,

Fijate si esto te sirve...

http://www.delphipages.com/forum/showthread.php?t=15395

Saludos,

Pancho
Córdoba
Argentina

2015-12-09 21:20 GMT-03:00 Héctor Fiandor <hfiandor en ceniai.inf.cu>:

> Dear fellows<
>
>
>
> I am trying to show a StringGrid with column’s 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 don’t 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
>
> _______________________________________________
> Lazarus-es mailing list
> Lazarus-es en lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-es
>
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus-es/attachments/20151210/63da1b39/attachment-0002.html>


More information about the Lazarus-es mailing list