Object inspector is one of the main tools used for application interface development. It is used to set up properties and events of components and a form.
To open the Object Inspector window:
Select the View > Object Inspector main menu item.
Click the button on the toolbar.
The top part of the Object Inspector window displays a drop-down list, which contains all components of a designed form. The list includes the form as well. After selecting an element in the list it is selected on the form. The object inspector displays properties of the selected element. If there are a number of objects selected, the object inspector shows only general properties of the selected objects.
The Properties and Events tabs show tables, the first column of which lists properties or events, and the second column contains property values or names of event handlers.
The object inspector has a context menu with the following commands:
Property or event help.
Go to class inspector.
The required property/event can also be selected and the F1 key can be pressed to open help.
Properties are object attributes. To edit property value, select the required property in the object inspector and determine its value in the second column. A new property value is saved after the property loses focus or after the ENTER key is pressed. If the entered property is invalid, the previous value is restored.
The value editor view depends on the property type:
String or Number. Editor is an edit box where the user can enter a text or a number:
Enumerable Property. Editor is a drop-down list because this property type may take only a value selected from a predefined set of values. The value can be selected in the list or entered manually, however, the entered value must be listed in the allowed values menu. Double-click on a value selects the next list element. Some properties may have a dynamic list of allowed values, that is, the list element may change with form development. It is relevant for properties that set name of another component located on the form:
Object. Editor is a modal dialog box. To open the editor, click the ellipsis button or double-click the property value. Dialog box appearance depends on the specific property:
Compound Property. The object inspector displays a compound property with expander. Double-click property name or click the expander to expand the tree of subproperties. Editing a property means editing its subproperties:
Working with events in the object inspector is almost in the same way as working with enumerable properties. A list of valid values for events includes names of appropriate subprograms of the current unit. Double-clicking the right column of an event generates a predefined structure for an event handler.
If the name of a non-existing subprogram for an event handler is entered, a predefined structure of a handler subprogram with this name is inserted in the editor window.
An event handler can be renamed by editing its name in the object inspector.
See also: