Expert Delphi
Expert Delphi

Reputation: 11

Firemonkey forms opened with TForm.Show are get hiden when OnClick of the main form is performed

When a form is opened with TForm.Show, and you click outside of this form, it will hide. On the VCL it doesn't happens.

I could use the property FormStyle set to StayOnTop, but it would not be good for the kind of application i'm building.

What could i do to solve this?

Upvotes: 0

Views: 813

Answers (1)

Expert Delphi
Expert Delphi

Reputation: 11

I had to set the Parent of the second form. Just like this:

SecondForm.Parent := MainForm;

Doing this, when you click on the MainForm, the focus is changed, but the second form doesn't hide behind the MainForm.

Upvotes: 1

Related Questions