Using Design Guidelines with VCL Components
Go Up to How To Create Forms and Projects, and Write the Code Behind
You can use VCL with Delphi or C++ to setup components that are "aware" of their relation to other components on a form. You can set properties to specify the distance between controls, shortcuts, focus labels, tab order, and maximum number of items (listboxes, menus).
To see and use the design guidelines
- Register an object type. That is, write a Register procedure similar to the Register procedure in the ShellControls sample. Choose Start > Programs > Embarcadero RAD Studio > Samples to find the ShellControls sample.
- Indicate various points on or near a component's bounds that are "alignment" points. These "alignment" points are vertical or horizontal lines that cut across a visual control's bounds.
- Supply UI guideline information so that each component will adhere to rules such as distance between controls, shortcuts, focus labels, tab order, maximum number of items (listboxes, menus),
Your new form will display four columns in the upper portion of the window, and six radio buttons in the bottom portion of the window. The following table describes each of the columns.
| Component | Default Value when 'Use Design Guidelines' is Set |
|---|---|
|
Alignment |
The names of the columns of the table in which an error has occurred. |
|
Margins |
Bottom = 3, Left = 3, Right = 3, Top = 3 |
|
Padding |
The last update that was saved to the Server. (This represents what the row contains on the server.) |