Inserting Choice Controls in Edit Table Cells

Revision as of 21:29, 16 July 2007 by Lchrisman (Talk | contribs) (started mini-tutorial.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 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.


You are not allowed to post comments.