Opening an About Box from the Macro Page

If you want to present background or related information for the program that is connected to your macro page, you can create an about box, that is, a separate information page, and make it accessible as a pop-up panel.

Prerequisite

  • You have created a macro page for your program.

  • You have added a Variables folder to the macro page.

  • You have created a bitmap that contains the information that you want to show in the about box.

Procedure

  1. In the Templates Tree, add a template and name it About.
  2. On the toolbar, click Edit Element and set the size of the template to the size of the macro page.
  3. Add the about box bitmap by dragging it from the Resource/Library Browser onto the canvas.
  4. Position the bitmap where you want the about box to appear.
  5. Optional: If necessary, activate Scalable in the Properties section and specify the correct size for the about box.
  6. Click Switch Back to Macro Page/Parent Template.
  7. In the GUI Tree, create a Popup List variable for the macro page and name it aboutbox.
  8. In the Properties section for the variable, enter About in the first line.

    This connects the variable to the About template.

  9. Add a switch to the macro page by dragging it from the Resource/Library Browser to the GUI Tree.
  10. Click Edit Element on the toolbar, select the switch element, and set the Mode to exclusive.

    This way, the switch performs one exclusive switching operation. In this case, we want it to open the about box.

  11. Set the Onvalue for the switch to 1.
  12. Set the Value parameter to @aboutbox to connect it to the Popup List variable.

    If you now click the switch, it sends a value of 1 to the Popup List variable. This will open the About template that is located at the first line in the variable.

  13. Click Switch Back to Macro Page/Parent Template.
  14. Activate Test Macro Page on the toolbar and click the switch.

    This opens the about box at the specified position on the canvas. Now, you need a way to close the about box again.

  15. Deactivate Test Macro Page, open the Templates Tree, select the About template and click Edit Element on the toolbar.
  16. Click Create New Element and select a switch to the About template.

    We want to switch back to the macro page by clicking anywhere on the page, therefore, we need a simple switch in the size of the macro page, which does not contain a label.

  17. Select the switch and click Edit Element.
  18. Adjust the size of the switch so that it spans the entire macro page.
  19. Set the Mode to exclusive.
  20. Set the Value to @aboutbox to connect the switch with the Popup List variable.
  21. Set Onvalue to 0.

    This way, the About template is removed from the macro page when the switch is pressed.

  22. Go back to the GUI Tree for the macro page by clicking Switch Back to Macro Page/Parent Template and activate Test Macro Page.
  23. Click the switch on the macro page to open the about box and click anywhere on the page to close the about box again.