INFORMIX
Visionary User's Guide
Chapter 7: Modifying Object Properties
Home Contents Index Master Index New Book

Modifying Properties

To modify the properties of an object, you use the Object Inspector and either the Scene Editor or the Data Element Editor. You can position and size objects in the editor window. You can also select an object in the editor window and then view and modify its properties and child object properties in the Object Inspector.

For example, to modify the text label Automobile Sales, you might want to edit the text or you might want to change the font style. To edit the text, you select the Text object. To change the font style, you must select the Text.Font child object.

Tip: When you want to modify the appearance of objects in a world, keep in mind that the properties you want to modify might belong to the object you select or they might belong to a child object of the selected object.
Figure 7-6 shows two views of the Object Inspector (plus an intermediate step). The left view shows the Text2 object selected and the right view shows its child object Text2.Font2 selected. The intermediate step shows the drop-down list of objects from which you select the child object.

Figure 7-6
Selecting Text and Text.Font Object Properties

Basic Steps

Follow these steps to modify object properties:

    1. Open the scene or data element that contains the object.

    2. Right-click the object in the open editor window and select Properties from the popup menu.

    If the object belongs to the scene, you select it in the Scene Editor. If the object is part of a data point in a layout, you select it in the Data Element Editor.

    3. Click the property cell in the Object Inspector to display a list box or to enable text editing.

    4. Select a value from the list box or type the property value.

    5. Click Runtime Mode in the editor window to view the results.

Property Expressions

Property expressions are the values that you can specify for an object property and can include the following elements:

When you use a property expression, you can combine any of these mathematical elements. Property expressions are case-insensitive.

The simplest property expression is a single value, such as an integer or text string. You can write more advanced property expressions to refine the appearance of objects and to specify the conditions under which objects appear.

Required Data Types

When you specify a property expression for a property value, the expression must return a value of the data type required by the property. Object properties and their supported data types are listed by object in Appendix A, "Object Properties Reference."

Important: To return the value you want in the required data type, you might need to cast the column in your property expression to the appropriate data type.

Examples

The following table contains examples that illustrate some uses of property expressions.

Property Name Example Description

PlotAreaWidth

1/ViewerZoom

Changes the size of a layout, depending on the zoom level.

Color

If(IsViewer("investor", red, blue))

Sets color of a data symbol, depending on the viewer class.

Value

FormatVal("$####.00", sales)

Formats values using dollar signs.

Location

(salesday, Min(open,close))

Sets the location of a data point to the lower of the opening or closing price.

Upperlimit

"1999-12-31"

Sets the upper limit on a date/time axis to December 31, 1999.

Property Functions

Property functions are functions provided by Visionary for you to use when you set object properties. Property functions are similar to spreadsheet functions; they enable you to set properties dynamically, depending on a calculated value or a parameter.

For example, you can restrict viewing of a data element by calling the IsViewer( ) function and specifying a particular viewer class in the visibility property.

Visionary provides the following types of property functions:

Suppose you want each wedge in a pie chart to be a different color, so that you can create a color key representing different companies, different parts, or whatever the wedges represent.

To display a sequence of colors, you can modify the color property of the Wedge object using a property expression that calls a color function. Figure 7-7 shows an example of a property expression that calls two functions: ColorSeq1[ ] and PointNumber( ).

Figure 7-7
Writing a Property Expression to Modify Color

For information about color sequences and resources, see Chapter 11, "Adding Resources and Global Parameters to a World." For a description of the PointNumber( ) function and other property functions, see Appendix C, "Functions and Support Syntax."




Visionary User's Guide, version 1.0
Copyright © 1998, Informix Software, Inc. All rights reserved.