- Properties
- Types of Properties
- Events
- Streamability
- Ownership
- Parenthood
Types of Properties
The standard rules that apply to Object Pascal data types apply to properties as well. The important point about properties is that their types also determine how they're edited in the Object Inspector. Properties can be of the types shown in Table 1. For more detailed information, look up "properties" in the online help.
Table 1 Property Types
Property Type |
Object Inspector Treatment |
Simple |
Numeric, character, and string properties appear in the Object Inspector as numbers, characters, and strings, respectively. The user can type and edit the value of the property directly. |
Enumerated |
Properties of enumerated types (including Boolean) display the value as defined in the source code. The user can cycle through the possible values by double-clicking the Value column. There's also a drop-down list that shows all possible values of the enumerated type. |
Set |
Properties of set types appear in the Object Inspector grouped as a set. By expanding the set, the user can treat each element of the set as a Boolean value: True if the element is included in the set and False if it's not included. |
Object |
Properties that are themselves objects often have their own property editors. However, if the object that's a property also has published properties, the Object Inspector allows the user to expand the list of object properties and edit them individually. Object properties must descend from TPersistent. |
Array |
Array properties must have their own property editors. The Object Inspector has no built-in support for editing array properties. |
NOTE
Because components are objects, they can therefore have methods. See Chapter 2 of Delphi 6 Developer's Guide (Sams, 2001, ISBN 0-672-32115-7) for relevant information on object methods.