:
This message was edited by porodoro at 2006-1-3 7:9:28
:
This message was edited by porodoro at 2006-1-3 7:8:50
: I've tryed this :
:
: Panel1.top := (form1.Height - form1.height) + panel1.height div panel1.Height+form1.top;
: panel1.left := (form1.width - form1.width) +form1.width div panel1.width ;
:
:
: but it doesnt seem to work in all cases..
:
:
:
:
:
The formula for the middle is:
Panel1.Left := (Form1.ClientWidth div 2) - (Panel1.Width div 2);
Your formula is this:
panel1.left := 0+form1.width div panel1.width;
since Form1.Width - Form1.Width = 0 for every value in Width. Also the Top and Left of controls are relative to the top-left corner of the form.