Hello Bart,
Thank you, I'm aware of that code (and using it). But the problem is that I'm trying to align the components at the center of the screen when the user changes the orientation of the phone/tablet and I can't get this kind of alignment to work (with Delphi).
When I try to program the alignment by calculating the sceen's width and positioning the components at the center they got to wierd positions and I have to reload the screen (not acceptable).
I tried this:
procedure TFrmMainMobile.IWAppFormResize(Sender: TObject);
begin
if (RgnMblLog.Visible) then
begin
ImgLogoLab.Left := (self.Width - ImgLogoLab.Width) div 2;
EdMblNome.Left := (self.Width - EdMblNome.Width) div 2;
EdMblPW.Left := EdMblNome.Left;
LblMblCod.Left := EdMblNome.Left;
LblMblPw.Left := EdMblNome.Left;
LblTbltTipoLog.Left := EdMblNome.Left;
CmbMblTipoLog.Left := EdMblNome.Left + EdMblNome.Width - CmbMblTipoLog.Width;
BtnMblLogon.Left := (self.Width - BtnMblLogon.Width) div 2;
end;
end;
with no success.
The left parameter is calculated correctly (I verified debugging) but the render isn't applied correctly.
Any ideas? Perhaps I should try some other way? Is there some parameter that I should set to make this work?
Thank you
Andrew