Re: How to make TCheckBox autosize work correctly on Linux?

Martin Wynne via fpc-pascal <[email protected]> Wed, 7 Jan 2026 09:55:19 +0000
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <[email protected]>
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.
_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal