Difference between revisions of "Action Objects"

From GeoGebra Manual
Jump to: navigation, search
m (Updated tool names)
m
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>
 
{{objects}}
 
{{objects}}
 
For interactive worksheets with [[Scripting|scripting]] Action Objects may come handy. There are four types of them
 
For interactive worksheets with [[Scripting|scripting]] Action Objects may come handy. There are four types of them

Revision as of 12:29, 9 July 2015



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

Example: Input Box with 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 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 Button Tool or Button Command.

Drop-down lists

If you want to show the contents of a list in a drop-down list:

  • in the Graphics View: check the Draw as drop-down list box in the Basics tab of the Properties dialog window of the list.
  • in the Spreadsheet View: enter a list into the spreadsheet, then check the Use Buttons and Checkboxes box in the Layout tab of Options Dialog.

The selected element of a drop-down list may be also obtained using SelectedIndex and SelectedElement commands.

© 2024 International GeoGebra Institute