On Tue, 6 Jan 2026 23:50:43 +0000, Martin Wynne via fpc-pascal
<[email protected]> wrote:

>On 06/01/2026 23:15, Bo Berglund via fpc-pascal wrote:
>> Did not work:
>> 
>> Error: Identifier not found "ControlCanvas"
>> 
>> Where is this item declared?
>
>Sorry, that was Delphi code for Windows. In Lazarus for cross-platform 
>do this:
>
>uses
>   LCLIntf;
>
>var
>   w,h:integer;
>
>begin
>   with checkbox do begin
>    AutoSize:=False;
>    Caption:='new text';
>    GetTextSize(Font,Caption,w,h);
>    Width:=w+30;
>   end;
>
>
Tested but:

Still not working:
Error: Identifier not found: GetTextSize

Does this depend on something outside of Lazarus?


-- 
Bo Berglund
Developer in Sweden

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to