Difference between revisions of "Inserting Choice Controls in Edit Table Cells"

(started mini-tutorial.)
 
(First few steps)
Line 13: Line 13:
 
[[image:Edit_table_with_choice_in_edit_mode.JPG]]
 
[[image:Edit_table_with_choice_in_edit_mode.JPG]]
  
When the edit table is viewed from edit mode (i.e., by a model builder), we see this.  When the same table is viewed from browse mode (i.e., by the user of the model), the controls display.  For the table to be changeable when viewed in browse mode, the table must have an input node.  So, the basic steps are to create the edit table, make an input node for the table, create the indexes containing the list of valid choices for each pulldown, and finally populate the edit table with calls to the choice function, where appropriate.  Later in the tutorial, we'll also learn how to configure the table so that if new rows are added, the default cell contents for the new row (with choice controls) are automatically inserted.
+
When the edit table is viewed from edit mode (i.e., by a model builder), we see this.  When the same table is viewed from browse mode (i.e., by the user of the model), the controls display.  For the table to be changeable when viewed in browse mode, the table must have an input node.  So, the basic steps are to create the indexes containing the list of valid choices for each pulldown, create the edit table, make an input node for the table, and finally populate the edit table with calls to the choice function, where appropriate.  Later in the tutorial, we'll also learn how to configure the table so that if new rows are added, the default cell contents for the new row (with choice controls) are automatically inserted.
 +
 
 +
= Identifying Possible Selections =
 +
 
 +
1. Start Analytica 4.0 and fill in the object window:
 +
 
 +
[[image:ECTut_object_window.JPG]]
 +
 
 +
2. Close the object window
 +
 
 +
3. We'll begin by defining the possible Plant types.  Drag an index to the diagram and title it: Plant Type
 +
 
 +
4. Press [[image:Expr.jpg]] to edit the definition, and in the definition type pulldown, select "List of labels".
 +
 
 +
5. Fill in the possible plant types as shown:
 +
[[image:Plant_types.JPG]]

Revision as of 21:51, 16 July 2007

Mini-tutorial: Choice controls in edit table cells

A new feature in Analytica 4.0 is the ability to present pulldown controls in the cells of an edit table. Using pulldowns in this fashion can provide a convenience to the users of your model, and ensure that they select only valid values for cell values. The following screenshot demonstrates the use of pulldowns in an edit table:

Power plant table with pulldowns.JPG

This short mini-tutorial takes you step-by-step through a simple example to produce the table shown.

How it is done

The edit table displayed above actually contains the following cell contents:

Edit table with choice in edit mode.JPG

When the edit table is viewed from edit mode (i.e., by a model builder), we see this. When the same table is viewed from browse mode (i.e., by the user of the model), the controls display. For the table to be changeable when viewed in browse mode, the table must have an input node. So, the basic steps are to create the indexes containing the list of valid choices for each pulldown, create the edit table, make an input node for the table, and finally populate the edit table with calls to the choice function, where appropriate. Later in the tutorial, we'll also learn how to configure the table so that if new rows are added, the default cell contents for the new row (with choice controls) are automatically inserted.

Identifying Possible Selections

1. Start Analytica 4.0 and fill in the object window:

ECTut object window.JPG

2. Close the object window

3. We'll begin by defining the possible Plant types. Drag an index to the diagram and title it: Plant Type

4. Press Expr.jpg to edit the definition, and in the definition type pulldown, select "List of labels".

5. Fill in the possible plant types as shown: Plant types.JPG

Comments


You are not allowed to post comments.