I wish I knew the answer to your questions but I don't. I was only thinking that with the Text.Width you might be able to figure out an answer. I don't see how you could do it without that information, but maybe there is better way.
On Sun, Nov 17, 2013 at 7:04 PM, Bart <[email protected]> wrote: > On 11/17/13, Avishai <[email protected]> wrote: > >> function GetTextHeight(ACtrl: TControl): Integer; >> var >> C: TBitMap; >> begin >> Result:= -1; >> C := TBitmap.Create; >> try >> C.Canvas.Font.Assign(ACtrl.Font); >> Result:= C.Canvas.TextHeight('TextHeight'); >> finally >> C.Free; >> end; >> end; >> > > Is the canvas of the area where the caption is drawn the same as > TForm's canvas, and is the font the same? I have no idea. > And it does not take the bordericons into account. > > Bart > > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Shalom, Avishai [email protected] אבישי גוֹר -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
