ChenHaibin Posted November 22, 2011 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! Quote
Administrators Farshad Mohajeri Posted November 22, 2011 Administrators 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. Quote
ChenHaibin Posted November 23, 2011 Author Posted November 23, 2011 Form.Position property is poDesktopCenter Quote
Administrators Farshad Mohajeri Posted November 24, 2011 Administrators Posted November 24, 2011 OK. Form is not automatically centered when change brosser size. You need to manually handle this in MainForm ScreenResize event. Quote
ChenHaibin Posted November 28, 2011 Author Posted November 28, 2011 please tell me what can I do for this? Quote
Administrators Farshad Mohajeri Posted November 28, 2011 Administrators Posted November 28, 2011 please tell me what can I do for this? Very easy. Just recalculate MainForm position in MainForm's OnScreenResize event. Quote
ChenHaibin Posted November 28, 2011 Author Posted November 28, 2011 Could you give me the code? thx! Quote
AtoZ Posted November 29, 2011 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 Quote
Administrators Farshad Mohajeri Posted December 1, 2011 Administrators 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; Quote
Administrators Farshad Mohajeri Posted December 1, 2011 Administrators 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. Quote
ChenHaibin Posted December 2, 2011 Author Posted December 2, 2011 Left:=(AWidth-Width) div 2; Top:=(AHeight-Height) div 2; is ok! thx! Quote
ChenHaibin Posted December 3, 2011 Author 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! Quote
Administrators Farshad Mohajeri Posted December 3, 2011 Administrators Posted December 3, 2011 If you need a Maximized MainForm then it is better to use mfPage mode in ServerModule. Quote
playsoft Posted July 21, 2018 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; Quote
Sherzod Posted July 21, 2018 Posted July 21, 2018 Hello, Can you please report to support portal ? Quote
Wilton Ergon Posted November 13, 2018 Posted November 13, 2018 THIS SO WORKS WITH THE OPTION ALIGNMENTCONTROL = uniAlignmentServer in the form Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.