Difference between revisions of "Action Objects"

From GeoGebra Manual
Jump to: navigation, search
(added v4 - needs links/description)
Line 3: Line 3:
 
For interactive worksheets Action Objects may come handy. There are four types of them
 
For interactive worksheets Action Objects may come handy. There are four types of them
 
==Checkboxes==
 
==Checkboxes==
 +
Checkboxes are graphical representations of [[Boolean values]]. See [[Check Box to Show / Hide Objects Tool]] for details.
 
==Text fields==
 
==Text fields==
 +
Textfields work as text inputs for [[Scripting|scripts]]. The script is triggered by changing text in the textfield and either pressing enter or leaving the textfield. The inserted value may be accessed using the %0 variable.
 +
{{example|Textfield with <code>a=a+%0</code> in script will increase number ''a'' by the entered value.}}
 +
If you want the textfield 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.
 
==Buttons==
 
==Buttons==
 
==Comboboxes==
 
==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]].

Revision as of 23:20, 26 May 2011


For interactive worksheets 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.

Text fields

Textfields work as text inputs for scripts. The script is triggered by changing text in the textfield and either pressing enter or leaving the textfield. The inserted value may be accessed using the %0 variable.

Example: Textfield with a=a+%0 in script will increase number a by the entered value.

If you want the textfield 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.

Buttons

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.

© 2024 International GeoGebra Institute