1. Computing

Select a Control Parent in the Delphi Form Designer

Select a Control Parent in the Delphi Form Designer

From , former About.com Guide

Structure (Parentage) View in Delphi IDE

Structure (Parentage) View in Delphi IDE

When designing forms (frames) for your Delphi application, you often use container type controls such as a TPanel or TGroupBox to hold other controls.

In complex form designs, where containers are used inside other containers, it is sometimes hard to quickly "navigate" to a particular button, for example, to change its Caption.

To quickly locate (and select) a control's parent, just select the component/control whose parent you wish to find and press the ESCape key.

Since the overal parent of all the controls on a form is the form; this procedure can be used repeatedly: finally the Form is selected.

Of course, when a component on a form is selected at design time, the Object Inspector displays its (published) properties and allows you to edit them.

Note 1: When you set the Align property to alClient the control will fill its entire parent. This way to select a control's parent is especially useful in such situations.

Note 2: The Delphi IDE's "Structure View" shows the hierarchy of components displayed on the form. You can double-click a component to select it on the form.

Delphi tips navigator:
» Drop Multiple Instances of a Component on a Delphi Form
« Remove MDI Child Form's Title Bar

©2013 About.com. All rights reserved.