Setting Component Properties (Procedure)

From RAD Studio
Jump to: navigation, search

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


After you place your components on your Designer, set their properties using the Object Inspector. By setting a component's properties, you can change the way a component appears and behaves in your application. Because properties appear during design time, you have more control over a component's properties and can easily modify them without having to write additional code.

To set component properties:

  1. On the Object Inspector, click the Properties tab.
  2. Set the component properties by entering values in the text box or through an editor.

Different types of properties have different editors:

  • Integer, float, and string properties can be edited directly in the property's text box.
  • Enumeration properties display a combo box instead of a text box, from which you can select an enumeration value.
  • Set properties can be expanded in the Object Inspector to display a list of options represented by check boxes. These check boxes can be toggled to either include to or exclude an option from the set.
  • Boolean properties display a check box that can be toggled. The checked state represents a value of True and an unchecked state-- a value of False.
  • Date properties can be edited directly or can display a date-time picker control that allows you to select the appropriate date easier.
  • Class properties can be expanded in the Object Inspector to display the properties of the exposed child object.
  • Properties that expect component references are displayed in red and show a combo box that allows you to select a compatible component that is present on the same Form or Data Module.
  • Custom properties display a [...] button at the right side of the text box. Pressing that button displays a custom editor dialog.

See Also