Home > Articles > Programming > General Programming/Other Languages

  • Print
  • + Share This
From the author of

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


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.


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.


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.


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 properties must have their own property editors. The Object Inspector has no built-in support for editing array properties.


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.

  • + Share This
  • 🔖 Save To Your Account