Google ClassroomGoogle Classroom - Interaktiva lektioner
GeoGebraGeoGebra Classroom - Interaktiva lektioner

Using Checkbox

Checkbox is very useful for controlling what information you want to show in a GeoGebra applet. It is basically connected to a specific Boolean variable so that you can change its value to true / false by checking / unchecking the box. Let's do the classwork to learn how to use it.
Classwork: Do the following step by step in the applet below.
  1. Draw a triangle and all its medians (the line segment from a vertex to the midpoint of the opposite side. Then construct the intersection point G of the medians. This is the centroid of the triangle. Change this point to red in color.
  2. Use Toolbar Image to create a checkbox - In the dialog box, type "Three medians" as the caption and select the three medians and the three midpoints. Let the boolean variable of this checkbox be "a".
  3. Uncheck and check the checkbox to hide and reveal the three medians. Notice the change in the boolean value of the variable corresponding to the checkbox.
  4. Use Toolbar Image again in the same way to create a checkbox for the centroid G. Let the boolean variable of this checkbox be "b".
  5. Suppose we want to hide the centroid checkbox and Point G when three medians checkbox is unchecked. First, we left-click on the centroid checkbox and select "setting". Go to the "Advanced" tab and select "Visibility". Enter "a" in the "Condition to Show Object" box. (Note: The object will show when a = true). Second, we left-click on Point G and select "setting". Go to "Visibility" like in the same way. Enter "a && b" in the "Condition to Show Object" box. (Note: The object will show when a = true and b = true).
Classwork: Add a new checkbox "More hint" in the GeoGebra applet below so that the text "Midpoint theorem" will show when it is checked. Also this checkbox should be hidden when the "Answer" is unchecked.