Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus-es / 2015-12

stringGrid

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Héctor Fiandor

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

------------ 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>

Reply by email

francisco prieto
to Héctor Fiandor

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>:

Show quoted text 76 lines
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.freepascal.org/pipermail/lazarus-es/attachments/20151210/63da1b39/attachment.html>

Reply by email

Héctor Fiandor
to francisco prieto

Estimado Francisco:

Gracias por su respuesta.

Trate de entrar al link y me da un mensaje que dice Servidor no encontrado.

Trat� de entrar en http://www.delphipages.com/forum/ y tambi�n me da ese mensaje.

Seguire insistiendo.

Saludos,

Ing. H�ctor Fiandor

hfiandor en ceniai.inf.cu

De: francisco prieto [mailto:fajprieto en gmail.com] Enviado el: jueves, 10 de diciembre de 2015 05:27 a. m. Para: Spanish version of Lazarus List
Asunto: Re: [Lazarus-es] stringGrid

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

Reply by email

Paola Bruccoleri
to Héctor Fiandor

El 10/12/2015 a las 8:53, H�ctor Fiandor escribi�:

Show quoted text 12 lines
Estimado Francisco: Gracias por su respuesta. Trate de entrar al link y me da un mensaje que dice Servidor no encontrado. Trat� de entrar en http://www.delphipages.com/forum/ y tambi�n me da ese mensaje.

Hola H�ctor
debes tener alg�n problema con el acceso o quiz�s tengas alg�n filtro.. no s�, porque al sitio se accede correctamente
saludos!

------------ pr�xima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus-es/attachments/20151210/8a64d84f/attachment.html>

Reply by email

Héctor Fiandor
to francisco prieto: Fijate si esto te sirve... http://www.delphipages.com/forum/showthread.php?t=15395 Pancho…

Estimados colegas>

Ya resolv�. Parece que era un problema de ordenar los c�digos.

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/20151210/bd7b1428/attachment-0001.html>

Reply by email