Executing the CheckBox command produces a function call.
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 "CheckBox0", which still exists in this worksheet. Inserting additional content whose input contains another component with that same identity "CheckBox0" incurs a substitution of the input identity in order to avoid a conflict with the identity of the existing component.
The return value of the following call to InsertContent is a table which can be used to reference the substituted identity of the inserted component.
In the next example a plain green square image of 15-by-15 pixels is used as a custom selectedimage, while a grayscale image of the same size is used as the unselectedimage. Additionally, the size of the component is set to 75 pixels wide and 15 high.
The next example makes use of action code for a Check Box. When the Check Box is manually selected or unselected the 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.