Te trascribo una ayuda del foro Delphi...
Use "OnDrawColumnCell" event and put ';' inside the caption of the column between the two lines:
[DELPHI]procedure TForm2.DBGrid1DrawColumnCell(Sender: TObject; const Rect:
TRect;DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
S1, S2: String;
sCaption : String;
begin
sCaption := Column.Title.Caption;
with DBGrid1 do begin
Canvas.Brush.Style := bsClear;
if Pos(';',sCaption) = 0 then begin
s1 := sCaption;
s2 := '';
end else begin
s1 := Copy(sCaption,1,Pos(';',sCaption)-1);
s2 := Copy(sCaption,Pos(';',sCaption)+1,Length(sCaption)-Length(s1));
end;
Canvas.TextOut(Rect.Left+2, 2, S1);
Canvas.TextOut(Rect.Left+2, 16, S2);
end;
end;[/DELPHI]
Regards,
Abdulaziz Jasser
Saludos,
Pancho
C�rdoba
Argentina
2015-12-12 9:37 GMT-03:00 H�ctor Fiandor <hfiandor en ceniai.inf.cu>:
Show quoted text 28 lines
Dear fellows:
I am using a DBGrid in a form. Some titles are too long and I want to
write this line in a Multiline type. I have read the Grids Reference Page,
but I can?t found how to do this.
I will appreciate any help.
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/20151212/d9c8bedb/attachment.html>