ChenHaibin Posted November 22, 2011 Share Posted November 22, 2011 If the browser is not maximized, opening a form is centered, and then adjust the browser for maximum, this form not adjusted to the middle position. For example, loginform. Similarly, if the browser is not maximized, opening a form is maximum, then adjust the browser for maximum, this form not adjusted to maximize...... thx! Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 22, 2011 Administrators Share Posted November 22, 2011 If the browser is not maximized, opening a form is centered, and then adjust the browser for maximum, this form not adjusted to the middle position. For example, loginform. What is Form.Position property? Similarly, if the browser is not maximized, opening a form is maximum, then adjust the browser for maximum, this form not adjusted to maximize...... This behavior is normal for Ext JS windows. Link to comment Share on other sites More sharing options...
ChenHaibin Posted November 23, 2011 Author Share Posted November 23, 2011 Form.Position property is poDesktopCenter Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 24, 2011 Administrators Share Posted November 24, 2011 OK. Form is not automatically centered when change brosser size. You need to manually handle this in MainForm ScreenResize event. Link to comment Share on other sites More sharing options...
ChenHaibin Posted November 28, 2011 Author Share Posted November 28, 2011 please tell me what can I do for this? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 28, 2011 Administrators Share Posted November 28, 2011 please tell me what can I do for this? Very easy. Just recalculate MainForm position in MainForm's OnScreenResize event. Link to comment Share on other sites More sharing options...
ChenHaibin Posted November 28, 2011 Author Share Posted November 28, 2011 Could you give me the code? thx! Link to comment Share on other sites More sharing options...
AtoZ Posted November 29, 2011 Share Posted November 29, 2011 Other Q. to add. I noticed first time the form is shown the position of form is 0,0 and if i move it a bit it becomes ex. 60,230. Should not the form set its position to other then 0,0 when from is shown, the form has poScreenCenter ? Thx Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 1, 2011 Administrators Share Posted December 1, 2011 Could you give me the code? thx! MainForm->MonitorScreenResize->True procedure TMainForm.UniFormScreenResize(Sender: TObject; AWidth, AHeight: Integer); begin Left:=(AWidth-Width) div 2; Top:=(AHeight-Height) div 2; end; Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 1, 2011 Administrators Share Posted December 1, 2011 Other Q. to add. I noticed first time the form is shown the position of form is 0,0 and if i move it a bit it becomes ex. 60,230. Should not the form set its position to other then 0,0 when from is shown, the form has poScreenCenter ? Thx If Form is centered no position is given and Ext JS automatically centers it. Since no position is specified when you read it it returns 0,0. Link to comment Share on other sites More sharing options...
ChenHaibin Posted December 2, 2011 Author Share Posted December 2, 2011 Left:=(AWidth-Width) div 2; Top:=(AHeight-Height) div 2; is ok! thx! Link to comment Share on other sites More sharing options...
ChenHaibin Posted December 3, 2011 Author Share Posted December 3, 2011 if a form windowsstate is wsMaximized and browser is not max then form is client in the browser,but if browser change to max then form's postion can not changer to max. how to do it? thx! Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 3, 2011 Administrators Share Posted December 3, 2011 If you need a Maximized MainForm then it is better to use mfPage mode in ServerModule. Link to comment Share on other sites More sharing options...
playsoft Posted July 21, 2018 Share Posted July 21, 2018 Hello, this is not working, I am using a version 1.10.2.1471 procedure TfrmCliente.UniFormScreenResize(Sender: TObject; AWidth, AHeight: Integer); begin UniLabel1.Caption:='Screen Size is = '+Format('%d x %d', [aWidth, aHeight]); Left:=(AWidth-Width) div 2; Top:=(AHeight-Height) div 2; end; Link to comment Share on other sites More sharing options...
Sherzod Posted July 21, 2018 Share Posted July 21, 2018 Hello, Can you please report to support portal ? Link to comment Share on other sites More sharing options...
Wilton Ergon Posted November 13, 2018 Share Posted November 13, 2018 THIS SO WORKS WITH THE OPTION ALIGNMENTCONTROL = uniAlignmentServer in the form Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now