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. Link to comment Share on other sites More sharing options...
wangxuebin Posted November 13, 2013 Share Posted November 13, 2013 Test onresize event 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; 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; 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 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