<div dir="ltr"><div><div><div><div>Te trascribo una ayuda del foro Delphi...<br><br>Use "OnDrawColumnCell" event and put ';' inside the caption of the column between the two lines:<br>
<br>
<br>
[DELPHI]procedure TForm2.DBGrid1DrawColumnCell(Sender: TObject; const
Rect: TRect;DataCol: Integer; Column: TColumn; State: TGridDrawState);<br>
var<br>
S1, S2: String;<br>
sCaption : String;<br>
begin<br>
sCaption := Column.Title.Caption;<br>
<br>
with DBGrid1 do begin<br>
Canvas.Brush.Style := bsClear;<br>
<br>
if Pos(';',sCaption) = 0 then begin<br>
s1 := sCaption;<br>
s2 := '';<br>
end else begin<br>
s1 := Copy(sCaption,1,Pos(';',sCaption)-1);<br>
s2 := Copy(sCaption,Pos(';',sCaption)+1,Length(sCaption)-Length(s1));<br>
end;<br>
<br>
Canvas.TextOut(Rect.Left+2, 2, S1);<br>
Canvas.TextOut(Rect.Left+2, 16, S2);<br>
end;<br>
end;[/DELPHI]<br>
<br>
Regards,<br>
Abdulaziz Jasser
<br><br></div>Saludos,<br><br></div>Pancho<br></div>Córdoba<br></div>Argentina<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-12 9:37 GMT-03:00 Héctor Fiandor <span dir="ltr"><<a href="mailto:hfiandor@ceniai.inf.cu" target="_blank">hfiandor@ceniai.inf.cu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="ES">
<div>
<p class="MsoNormal">Dear fellows:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I will appreciate any help.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal">Saludos,<u></u><u></u></p>
<p class="MsoNormal">Ing. Héctor Fiandor<u></u><u></u></p>
<p class="MsoNormal"><a href="mailto:hfiandor@ceniai.inf.cu" target="_blank">hfiandor@ceniai.inf.cu</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>_______________________________________________<br>
Lazarus-es mailing list<br>
<a href="mailto:Lazarus-es@lists.lazarus.freepascal.org">Lazarus-es@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-es" rel="noreferrer" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-es</a><br>
<br></blockquote></div><br></div>