How the Object Inspector Displays Properties

From Appmethod Topics
Jump to: navigation, search

Go Up to Object Inspector

The Object Inspector dynamically changes the set of properties it displays, based on the component selected and the options selected on the Object Inspector page of the Tools > Options > Environment Options dialog box. You can expand component references inline.

If multiple components are selected, only the shared properties are displayed. For example, if you select a Label and a GroupBox, you'll see the property Color along with other properties. If you select a Label and then a Button, the choice for Color goes away because Color is not a property for buttons. The Object Inspector has several other behaviors that make it easier to set component properties at design time.

  • When you use the Object Inspector to select a property, the property remains selected in the Object Inspector while you add or switch focus to other components in the form, provided that those components also share the same property. This enables you to type a new value for the property without always having to reselect the property.
  • If a component does not share the selected property, the product selects its Caption property. If the component does not have a Caption property, the product selects its Name property.
  • When more than one component is selected in the form, the Object Inspector displays all properties that are shared among the selected components. This is true even when the value for the shared property differs among the selected components. In this case, the property values displayed are either the default, or the value of the first component selected. When you change any of the shared properties in the Object Inspector, the property value changes those values in all the selected components.
There is one exception to this: when you select multiple components in a form, the Name property no longer appears in the Object Inspector, even though they all have a Name property. This is because you cannot assign the same name to more than one component in a form.

See Property and event categories in the Object Inspector for how to filter properties and arrange them by category.