Properties overview

Preface

Any form or widget has a set of properties, which is a collection of attributes describing its appearance and behaviour. Every property has a specific value. These values are generally static, but most of them may be dynamic, i.e. they may be bound to the application features, and hence change at runtime or invoke different actions.

To specify the properties at design time and bind them, the DM Interface Builder has properties dialog box. This dialog box consists of several property pages, which are dependent on the type of the widget they are associated with.

The properties dialog box

To activate the properties dialog box, you must have a form opened in design mode. Select a widget on a form. Then you have three possibilities:

Properties dialog box is modal, i.e. once it is activated, it stays on the screen. When you select another widget, the dialog box is automatically updated to reflect the properties of the selected widget.

Property page organization

Overview

Most of the property pages in the Display Machine share the same concept and visual layout. We shall describe the general ideas using Edit widget property page as an example.

"Edit" widget property page

Look at the screenshot above. The title of the properties dialog box displays the important information:

The property page itself is divided into two parts:

Properties tree

Property types

Overview

Properties in the properties tree may be presented in one of the following forms:

You may specify values directly in the property tree (except for non-editable properties). All values specified in such way are static, i.e. they cannot be altered at runtime.

Editable properties

These properties usually contain values of integer or string type. Examples of editable properties are: form title, menu text, widget size and position. You may enter a value directly in the properties tree. To do this, just select the property and press Space or F2. Then enter the new value in the small text editor area and press Enter. If the new value is successfully validated, it replaces the old one and appears in the property tree.

Check boxes

These are always boolean properties, for example: read-only, maximized, minimized. You can always distinguish such properties in the tree by a check box left to the property name. To toggle the property value, click on the check box icon or select the property and press Space.

Radio buttons

These properties represent a set of alternatives, for example: form type, text alignment. They are always grouped in the tree, and the chosen alternative is marked by a small dot left to the property icon. To choose an alternative, click on the property or select the property and press Space.

Push buttons

These properties represent specific cases, like choosing font or color. Usually these properties have a special customization dialog box. To customize the property, click on the property icon or select the property and press Space.

Non-editable properties

These properties correspond to some actions, event processing, or objects of non-basic types. The examples are: action, start dragging, drag object. You cannot specify any static value for these properties, only a dynamic value.

Property evaluation tree

Overview

Property evaluation tree contains data involving application objects and their features. This data is evaluated at runtime. For example, you may bind the width of a widget to some class attribute, or you may assign a set of actions to be performed when the user changes contents of the widget.

Property evaluation tree is populated by dragging and dropping features from the features view. Depending on the property being evaluated, different kinds of data may be dropped in the tree. It may be a constant, an attribute, an expression (a specific result type may be required), a sequence of actions (involving loops and conditional branches).

Interface

The name of the property being edited is displayed in the title of the group box enclosing the property evaluation tree. This may be an useful hint when you enter a value for the editable property and it is displayed in the tree instead of the property name.

Both static and dynamic property values can be specified for the most of properties. In this case both values are kept and you may switch between them using "Dynamic change" check box.

When "Dynamic change" is checked, the dynamic property value is used at runtime. The property in the properties tree is grayed, and it means that you cannot change its static value. But the property evaluation tree is enabled and you may drop features there, and change them.

When "Dynamic change" is cleared, the property evaluation tree is disabled and you cannot drop features or make any changes there.

However some properties may have only static or only dynamic values. In this case the "Dynamic change" check box is disabled and cannot be toggled.


Copyright © Object Tools -- info@object-tools.com
Last updated: 2005/02/02 11:51:10