Difference between revisions of "Action Objects"
(→Drop-down lists: Graphics View_>Algebra View) |
|||
Line 13: | Line 13: | ||
Buttons are meant to trigger scripts by being clicked. Although scripts can be triggered by clicking any other object (e.g. an [[Insert Image Tool|image]]), using buttons for this makes your worksheet more intuitive. | Buttons are meant to trigger scripts by being clicked. Although scripts can be triggered by clicking any other object (e.g. an [[Insert Image Tool|image]]), using buttons for this makes your worksheet more intuitive. | ||
Input Boxes can be created using [[Insert Button Tool]] or [[Button Command]]. | Input Boxes can be created using [[Insert Button Tool]] or [[Button Command]]. | ||
− | == | + | ==Comboboxes== |
− | + | Comboboxes are available only in [[Spreadsheet View]]. You may enter a list into spreadsheet cell and then turn on option ''Use Buttons and Checkboxes'' in Spreadsheet Tab of [[Options Dialog]]. The list will turn into a combobox; the selected element may be obtained using [[SelectedIndex Command]] and [[SelectedElement Command]]. | |
− | |||
− | |||
− | The selected element |
Revision as of 11:45, 11 June 2013
For interactive worksheets with scripting Action Objects may come handy. There are four types of them
Checkboxes
Checkboxes are graphical representations of Boolean values. See Check Box to Show / Hide Objects Tool for details. Checkboxes can be created using the aforementioned tool or Checkbox Command.
Input Boxes
Input Boxes work as text inputs for scripts. The script is triggered by changing text in the Input Box and either pressing enter or leaving the Input Box. The inserted value may be accessed using the %0 variable.
a=a+%0
in script will increase number a by the entered value. Works only if a is free.If you want the Input Box to change value of a free object (or redefine dependent object), you may define that object as linked. This way you don't have to insert any script. Input Boxes can be created using Insert Input Box Tool or InputBox Command.
Buttons
Buttons are meant to trigger scripts by being clicked. Although scripts can be triggered by clicking any other object (e.g. an image), using buttons for this makes your worksheet more intuitive. Input Boxes can be created using Insert Button Tool or Button Command.
Comboboxes
Comboboxes are available only in Spreadsheet View. You may enter a list into spreadsheet cell and then turn on option Use Buttons and Checkboxes in Spreadsheet Tab of Options Dialog. The list will turn into a combobox; the selected element may be obtained using SelectedIndex Command and SelectedElement Command.