[fpc-pascal] Anchors on a child form

Giuliano Colla giuliano.colla at fastwebnet.it
Mon Jun 4 18:18:25 CEST 2018


Il 04/06/2018 14:06, Martin Wynne ha scritto:
> uses Unit1;
>
> procedure TForm2.FormCreate(Sender: TObject);
> begin
>   Parent:=Form1;
>   Anchors:=[];
>   Visible:=True;
> end;
>
> 4. run it, and the debugger will show the error message. 

Just remove the two lines

Parent:= Form1; (which is wrong, because it makes Form2 a widget inside 
Form1)

and

Anchors:=[]; (which is useless)

And it will work.

Giuliano




More information about the fpc-pascal mailing list