Understanding automation : What are the main elements of automation? : What is a property? |
A property is like an adjective in that it represents an attribute or characteristic quality of an object. Properties can be returned or set, or they can be read-only.
Most classes have properties. As an illustration, the properties of the class car are that it is small, it has an engine, and it has four wheels. Every instance of the class car (that is, every object in that class) also has properties such as color, speed, and number of seats. Read-only properties are fixed by the design of the class; for example, the number of wheels or seats does not (usually) vary from car to car. However, other properties can be changed after the object has been created; for example, the speed of the car can go up and down, and, with a bit of help, its color can be changed.
In the context of CorelDRAW, Document objects have a name, a resolution, and horizontal and vertical ruler units; individual shapes have outline properties and fill properties, as well as a position and a rotation factor; and text objects have text properties, which may include the text itself. For example, ActiveDocument.Name
represents the Name property of a Document object; it specifies the name of the active document.
Copyright 2013 Corel Corporation. All rights reserved.