[fpc-pascal] How to make TCheckBox autosize work correctly on Linux?

Martin Wynne martin at 85a.uk
Wed Jan 7 10:55:19 CET 2026


On 07/01/2026 09:39, Bo Berglund via fpc-pascal wrote:
> Still not working:
> Error: Identifier not found: GetTextSize

Hi,

It relates to the widget set and destination platform.

Try this instead:

   with checkbox do begin
    AutoSize:=False;
    Caption:='new text';
    Width:=Canvas.TextWidth(Caption)+30;
   end;

Which is working fine here.

cheers,

Martin.


More information about the fpc-pascal mailing list