Hello,
It's my first TMS Web application, so please bear with me.
I'm testing to display another page after a user login. Here is my code:
procedure TForm1.WebLoginPanel1Login(Sender: TObject);
var
newform: TForm2;
begin
newform := TForm2.Create(Self);
newform.Parent := Form1;
// load file HTML template + controls
await(TForm2, newform.Load());
// init control after loading
newform.WebEdit1.Text := 'hello';
try
// excute form and wait for close
await(TModalResult, newform.Execute);
ShowMessage('Form 2 closed with new value:"' + newform.WebEdit1.Text + '"');
finally
newform.Free;
end;
Form2 has it's align property set to allclient.
Close button code is basic;
procedure TForm2.WebButton1Click(Sender: TObject);
begin
close;
end;
Form1 is displaying after closing the dialogbox.
As soon as I click on the Form1, I'm getting an error:
Any idea on how to fix this (only workaround I found was to remove newform.Parent := Form1; but then form2 isn't full screen anymore)
Thanks