Show: Delphi C++
Display Preferences

Using Design Guidelines with VCL Components

From RAD Studio
Jump to: navigation, search

Go Up to How To Create Forms and Projects, and Write the Code Behind

The VCL design guidelines appear when you select an element in the Form Designer and move it in relation to another element. The guidelines (for top, bottom, right, left, and center) help you align elements, including controls such as buttons and list boxes, as well as text captions. You can use the design guidelines and related features with Delphi or C++ applications to set up components that are "aware" of their relation to other components on a form.


To see and use the design guidelines

  1. Enable design guidelines by checking Use designer guidelines on the Tools > Options > Environment Options > Form Designer dialog box. (Design guidelines are enabled by default.)
  2. As you move visual elements on the Form Designer, you can control the alignment of elements in several ways:
    • Use the design guidelines that pop up between elements. For example, the design guidelines help you align the lower edge of the selected element with the lower edge of other nearby elements, and help you center an element relative to other nearby elements.
    • Use the values displayed in the window that pops up when you mouse-over a control. The popup window specifies the following:
      • Origin: the x,y coordinates (horizontal, vertical) of the upper left corner
      • Size: horizontal x vertical coordinates
      • Tab stop: True/False
      • Order: relative order of the selected element in its group
    • Use the Object Inspector to:
      • Assign values to the Align property (alTop, alBottom, alLeft, and so forth).
      • Assign values to the Anchors property (akTop, akLeft, akRight, or akBottom).


See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance