IDE Objects: The Object Inspector |
|
Introduction |
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:
Each field in the Object Inspector has two sections: the property’s name and the property's 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.
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:
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. |
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: 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.
Some fields can have only a true or false value. To change their value:
Some fields would require a list of items and need to be controlled by an intermediary action. Such fields display an ellipsis button:
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.
When you click some fields, a combo box appears:
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:
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-2016, FunctionX | |
|