Home

Embarcadero RAD Studio Windows: The Object Inspector

   

Introduction to the Properties of an Object

A property is a piece of information that characterizes or describes a control. You as the application developer must be aware of these properties so you can customize them for your particular application.

These members can be created as properties. In other words, a property is a value or an expression that describes an object. It could be related to its location or size. It could be its color, its identification, or any visual aspect that gives it presence on the screen.

The properties of an object can be changed either at design time or at run time. You can also manipulate these characteristics both at design and at run times. This means that you can set some properties at design time and some others at run time.

 

To manipulate the properties of a control at design time, you will use a window named the Object Inspector:

Object Inspector

A Property's Name and a Property's Value

Each field in the Object Inspector has two sections: the property's name and the property's value:

Property Name and Property Value

The box on the left side represents the name of a property. That name is in one word. This means that it is the actual name of the property defined in the class of the object it represents. The box on the right side of each name represents the value of the property.

There are various kinds of fields you will use to set the properties. To know what particular kind a field is, you can click its name. When you click the name or value of a field, a sign as >> displays on the left margin of the property's name.

To set or change a property, you use the box on the right side of the property's name: the property's value, also referred to as the field's value.

Empty Fields

By default, these fields have nothing in their properties. Most of these properties are dependent on other settings of your program. For example, you can set a menu property for a form only after you have created a menu.

To set the property on such a field, you can type in it or select from a list. If you type an invalid value and press Enter, you would receive an "Invalid Property Value" error:

Invalid Property Value

Text-Based Fields

There are fields that expect you to type a value. Most of these fields have a default value. To change the value of the property, click the name of the property, type the desired value, and press Enter. While some properties, such as the Caption, would allow anything, some other fields expect a specific type of text, such as a numeric value. If you type an invalid value, you would receive an error. You can click OK to dismiss the error dialog and type a new valid value.

Expandable Fields

Some fields have a + button. This indicates that the property has a set of sub-properties that actually belong to the same property and are set together. To expand such a field, click its + button and a ... button will appear:

Expanded

To collapse the field, click the ... button. Some of the set properties are created from an enumeration. Since the field was created as a Pascal-style set, this allows the property to have more than one value. Some other fields that have a + button are actually complete classes or a combination of classes.

Boolean Fields

Some fields can have only a true or false value. To change their value:

  • You can click the check box

Boolean Field

  • You can click the arrow of the property value's combo box and select the desired value
  • You double-click the property value to change from True to False or from False to True

Action Fields

Some fields would require a list of items and need to be controlled by an intermediary action. Such fields display an ellipsis button:

Action Field

When you click the button, a dialog box would come up and you can set the value for the field. You can also double-click the field value to call the dialog.

Selection Fields

When you click some fields, a combo box appears:

Selection

To change the value of such a field, you would use their combo box to display the available values. After clicking the arrow, a list would display:

Selection

There are various types of selection fields. Some of them display just two items. To change their value, you can just double-click the field. Some other fields have more than two values in the field. To change them, you can click their arrow and select from the list. You can also double-click a few times until the desired value is selected. On some other properties, you can double-click the field and a dialog box would come up.

 
 
 
 

Home Copyright © 2010 FunctionX, Inc.