## About Object Properties

Each object added to a template or form has a set of properties (or attributes) associated with it that control such things as the object’s position, size, colors, font, text, name, and so on. Each object also has associated with it a set of event handler functions that are triggered when certain events take place, such as the clicking or double-clicking the mouse on that object. These properties and event handlers may be viewed and/or modified using the Properties dialog box, also sometimes called a "property sheet".

Accessing an Object's Properties

The Properties dialog box may be viewed by selecting an object (by single-clicking within its boundaries) and then right-clicking. Here's an example property sheet that shows a text object, named Text1, and its various properties:

A sample Properties dialog box

Viewing Properties of Available Objects

At the top of the Properties dialog box is a drop-down list. This list box contains an entry for each of the objects in your template or form, as well as some objects that always exist and cannot be deleted, such as the main editing area itself. In the Report editor, the main editing area is called the Page. In the Label Editor and the Form Editor it is called The Frame/The View.

You can view the properties for any of the objects in your form or template by selecting a different object from this drop-down list. If you have a report template with more than one section, this list only shows objects in the current section.

Note: For report templates, an additional object called Report exists that you can only access from this drop-down list. It contains two properties in the Advanced category that allow you to specify your own external executable (a .exe file) to collect user assigned properties. These properties are Template Selection Program and Part Program Execution Program. PC-DMIS runs the specified programs during template selection and during part program execution respectively.

Understanding Property Organization

Properties for each object are divided up into three main categories: Standard, Advanced, and Events. You can collapse or expand each of these categories by clicking the + or - symbol to the left of each category.

In general, Standard properties generally control color, position, and line styles. Advanced properties control such things as whether or not the object is enabled or visible. Events allow you to use the BASIC language to code specific instructions when specified events occur.

Note: ActiveX and OLE objects have an additional section, discussed in their respective topics: "ActiveX Object" and "OLE Object".

For a description of available properties, see the "Common Properties" topic, or if a description isn't found there, view object-specific documentation available from the "The Object Bar" topic. For information on Events, see the "About Events" topic.

Understanding the Name Identifier

When you insert an object to a template or form, a unique name identifier is automatically assigned to the object's ObjectCode property. Subsequent objects of the same type have the same name with an incremented numerical value behind it. For example, the editor automatically names your first Text object "Text1". It names subsequent Text objects "Text2", "Text3", and so on. You can, of course, change this value to a different name. If you do, ensure that you give it a unique name. Any BASIC scripting that makes use of an object's code must also be updated if your modify that object's name identifier.

Changing Property Values

You can modify any property by selecting it, clicking its value, and either selecting a new value if it displays a drop down list, or by typing a new value if it's an edit field.

Expressions as Property Values

Some property values can hold reporting expressions instead of a constant value, just as a cell from a GridControlObject can hold expressions. Remember to preface the expression with an equals sign (=). For example, suppose you have a Text object in a label template and you want it to display the current feature's ID instead of some other text. In the Text property, you would type "=ID". During execution, it would pull the feature's name from PC-DMIS and display it in that Text object.

More:

Common Properties

Page Properties

The Frame/The View Properties

Working with User Assigned Properties

Clearing Template Associated Data

About Events and Visual Basic Code