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.
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.
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:
- Functions. Examples of functions include built-in functions, such as Min( ), and user-defined functions, such as MyColormap( ). Use functions to calculate or convert values or to specify Boolean conditions.
- Operators. Examples of operators include =, >, and <. Use operators to perform arithmetic, to compare values, or to concatenate values.
- Columns. Examples of column names might be fund_name, open_price, or close_price in a mutual_funds table. Use column names as variables in which the data returned depends on the value of the column.
- Formatting symbols. Examples of formatting symbols are $, #, and %. Use these symbols to format numeric and date/time values.
- Constants. Examples of constants are values for any valid data type, such as True and False for a Boolean data type. Use constants in functions, with operators, with column names, and by themselves to specify a property value of the appropriate data type.
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."
Examples
The following table contains examples that illustrate some uses of property expressions.
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( ).
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."
|