TssCentreControl is a non-visual component that centres an assigned control on its parent window. The control to be centred can either be the owning form or any control on that form. The assigned control is automatically centred when the form is first loaded, but it may be re-centred as necessary by calling the Centre method.

One advantage of centring child forms is that they can be associated with the application by always appearing over its currently active window. They are no longer created at a position that is independent of their parent.


Delphi 1 Yes    Delphi 2 Yes    Delphi 3 Yes    Delphi 4 Yes
Delphi 5 Yes Delphi 6 Yes Delphi 7 Yes Delphi 8 Yes
Delphi 2005 Yes Delphi 2006 Yes Delphi 2007 Yes

Note: later versions of Delphi allow a pop-up form to be centred on its parent without the use of this component. However, this component can still be useful for keeping other elements centred within their parent container.


Download centre.zip (8 KB)