>
|
|
>
|
|
>
|
|
Executing the RadioButton command produces a function call.
>
|
|
| (1) |
By using commands from the Layout Constructors package a nested function call can be produced which represents a worksheet.
>
|
|
That XML representation of a worksheet can be inserted directly.
>
|
|
The previous example's call to the InsertContent command inserted a component with identity "RadioButton0", which still exists in this worksheet. Inserting additional content whose input contains another component with that same identity "RadioButton0" incurs a substitution of the input identity in order to avoid a conflict with the identity of the existing component.
In the next example, all three button's identities can be replaced by substitution, as a chain of consequences. The first button with caption "A" has its identity replaced to avoid a conflict with the button inserted in the previous example. The second button with caption "B" can have its identity replaced to avoid a conflict with the new, substituted identity of button "A". Button "C" can have its identity replaced to avoid a conflict with the new, substituted identity of button "B".
>
|
|
>
|
|
>
|
|
>
|
|
The return value of the following call to InsertContent is a table which can be used to reference the substituted identities of the inserted components.
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
The next example makes use of action code for a pair of grouped radio buttons. When either radio button is manually selected the respective action code is executed.
The action code updates a PlotComponent with identity "Plot0", which will be an additional part of the inserted content. This component will be constructed using the Plot Component constructor.
>
|
|
>
|
|
Each action code consists of multi-line statements supplied as a string.
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
Following insertion either radio button can be manually selected, which causes the respective action code to execute and the "Plot0" component to be updated.
>
|
|
>
|
|
>
|
|