Dock to TAnchorDockPanel?
see https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/37165 there is an example there
Tryied with
if not (Assigned(FViewPermissoesModulos)) then FViewPermissoesModulos := TViewAtributoProjetoPermissoesModulos.Create(Self); FViewPermissoesModulos.ManualDock(panel1); FViewPermissoesModulos.BorderStyle := bsNone; FViewPermissoesModulos.Align := alClient; FViewPermissoesModulos.Show;
it also didn't work
For testing purposes, I assigned a showmessage, passing Self.Name to see what was going on, and the message showed the name of the main form when it should have showed the name of the parent form. (trying to close the parent form).