Bart schrieb:

Is it possible to determine how many characters fit in a TEdit (at
runtime), given that the choosen font is of fixed pitch (like
Courier).
Example:
TEdit: Width = 300
Font; Courier New, Size=16

TEdit.GetTextWidth() does not help here, it returns 16 for any font
and size (because we cannot access the canvas).

You can use it in your edit.OnPaint handler, where you also can scroll the text. Eventually use an TLabel instead of TEdit, with better display control.

DoDi


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to