Remi
Remi

Reputation: 1299

Delphi 10.2 Tokyo transparant form not showing in Firemonkey multi device project

I'm updating my apps(Android, iOS) from Delphi 10 Seattle to Delphi 10.2 Tokyo. I have a few forms that use the transparency. I use this to create small popup like screens which still show part of previous form in the background underneath the transparent form.

My problem is now that forms that have transparency property set to True don't show at all. It seems like the original form that calls the transparent form is on top of it.

On Windows the form is running normally and on iOS I can see some components, and some are sized/positioned wrongly.

How can I solve this?

Code sample below:

procedure TForm1.Button1Click(Sender: TObject);
var
  FrmTransParentForm: TFrmTransParentForm;
begin
  inherited;
  FrmTransParentForm := TFrmTransParentForm.Create(nil);
  FrmTransParentForm.Show;
end;

procedure TFrmTransParentForm.Button1Click(Sender: TObject);
begin
  Close;
end;

procedure TFrmTransParentForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := TCloseAction.caFree;
end;

TFrmTransParentForm form is a plain form with only a button aligned in center of the screen and with form property transparency set to true.

Upvotes: 1

Views: 1024

Answers (1)

franckcl
franckcl

Reputation: 1

I have the same issue. To display messages (showmessage style) I created a dedicated form with a label and an OK button. This form is created automatically when the application is opened. Sometimes, after the "show", it is not visible when it is active, ie all fields below are no longer accessible and if I press the RETURN button Phone, the fields become active again. All suggest that it's just a display problem. In the OnShow, I tried to specify BringToFront and I set the FormStyle property to StayOnTop.

I have the impression that this is a memory problem because when it happens, if I close all the applications on the mobile or reboot, the messages appear well.

This phenomenon appears on several mobile brands. Thanks Franck

Upvotes: 0

Related Questions