Skip to content

Buttons Text Controls

Saif Ahmed edited this page Sep 1, 2019 · 7 revisions

Buttons

Buttons are detected using curly braces { }. See the Calculator for an example. The content in between becomes the label of the button.
Each button detected is allocated an id, can be accessed as $frame->{"btn<id>"} and calls a function &btn<id> when clicked. The user has to define the function in the main perl code. The console can report the respective references and functions called to help the developer (see image below).

Text controls

Text Controls (Input boxes) are detected using square brackets [ ]. See the Calculator for an example. The content in between becomes the default text of the text . Each text control detected is allocated an id, can be accessed as $frame->{"textctrl<id>"} and calls a function &textctrl<id> when clicked. The user, again, has to define the function in the main perl code.

The Calculator Example has a demo of both at play

Clone this wiki locally