mehmet07 Posted November 13, 2013 Share Posted November 13, 2013 Hi, i have unipanel on the main form. i want unipanel is mainform center. i write main form onshow event; pnlSonuc.Left := trunc((screen.Width - pnlSonuc.Width)/2) ; but pnlsonuc not screen center. Quote Link to comment Share on other sites More sharing options...
wangxuebin Posted November 13, 2013 Share Posted November 13, 2013 Test onresize event Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 14, 2013 Share Posted November 14, 2013 Test onresize event procedure TMainForm.UniFormResize(Sender: TObject); begin UniPanel1.Left := (Self.Width - UniPanel1.Width) div 2; UniPanel1.Top := (Self.Height - UniPanel1.Height) div 2; end; Quote Link to comment Share on other sites More sharing options...
adragan Posted November 14, 2013 Share Posted November 14, 2013 UniPanel.Anchors.akLeft :=False; UniPanel.Anchors.akRight:=False; UniPanel.Anchors.akTop :=False; UniPanel.Anchors.akBottom:=False; Quote Link to comment Share on other sites More sharing options...
joriolm Posted November 15, 2013 Share Posted November 15, 2013 Hi, In my case I only adjust Anchors and selecting the UniPanel I pressed Center Horizontally button on Delphi and voila !!!! UniPanel walk to the center on resize event in my browser. 1 Quote Link to comment Share on other sites More sharing options...
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.