In GeoGebra there are a few tools that are considered to be [i][b]action tools[/b][/i]. These are [i][b]sliders[/b][/i], [i][b]check boxes[/b][/i], [i][b]input boxes [/b][/i]and [i][b]buttons[/b][/i]. This page will give an overview of what these object typically do. The construction below shows the "modern" view of the Algebra window while the screencast at the bottom of this page shows the "Classic" view. [br][br](This side originally created by [url=https://www.geogebra.org/themadmathematician]Jonas Hall[/url])
These tools are useful when you want to have more user interaction. [br][br][b]Sliders [/b]are graphical representations of numbers. They enable you to easily change a number by dragging a point on a segment. [br][br][b]Check Boxes [/b]are graphical representations of Boolean variables, i.e. variables that can take be either [b]true [/b]or [b]false[/b]. [br][br][b]Input Boxes [/b]are another way to enable users to set the value of an object. It can be a good way of accurately setting the value of a number, but you can also let the user specify functions, expressions, text etc. [br][br][b]Buttons [/b]contain scripts. When you click a button a sequence of commands are executed. This allows you to let the user do pre-defined actions.
The construction above uses the following KEY ELEMENTS: [br][br][list][*][b]Two numbers[/b]: Numbers can either be created using the Slider Tool [icon]/images/ggb/toolbar/mode_slider.png[/icon] or by simply entering a variable namne and a value, e.g. a = 10, MaxValue = 34 etc. If you use the second method no slider is visible in the graphics window until you make it visible by clicking the visibility button in the Algebra window. In the Classic version of GeoGebra, no slider is ever visible in the Algebra window but in the modern versions you have the slider always available in the Algebra window. [br][br][/*][*][b]Two input boxes: [/b] An input box is connected to an object, allowing the user to change the value or definition of that object. Click on the Input Box tool [icon]/images/ggb/toolbar/mode_textfieldaction.png[/icon] and then click roughly where you want the box. You can move it later by dragging with the right mouse button. [br][br]Please note that the Min and Max values of the number, as evident in the sliders, are also limiting the range of values you can input through the input box. Changing the number e.g. by entering a = 57 in the Input Field overrides this and changes the sliders Min or Max value to reflect this. [br][br][/*][*][b]A Check Box[/b]: In its simplest form, a check box can control the visibility of several objects simultaneously. When created, you are asked what objects you want to control. [br][br]But in reality, the check box really controls a Boolean variable, here called c and its only possible values are either [b]true [/b]or [b]false[/b]. This Boolean variable can control many other things as well, but in the simple default case, the name of the variable, "c", is automatically entered into the Conditional Visibility Field in the Advanced tab of those object's properties that you wanted to control. This can be done manually at any time as is shown in the screencast below, where the button is added later. Still we can let the buttons visibility be controlled by the checkbox by going into the buttons properties. [br][br][/*][*][b]A Button[/b]: A button simply contains a list of commands that are executed when you click the button. Here we create a button to reset the values of variables a and b to 0. In the Button dialog we enter the caption (The text to go on the button) and the two commands [br][br][code]a = 0[/code] and[br][code]b = 0[br][/code][br]Whenever the user clicks the button, these commands are executed and both variables are instantly set to 0. [/*][/list]
In the chapters that follow, you will be given more examples on how to use each of these four action tools to great effect. [br]