This section gives an illustrative example of using the Key Input Window feature. Settings may change based on your project’s configuration. |
Exercise: Making a keypad using a key input window object
In this exercise, you will design a custom keypad page to accept input when a button is pressed.
a) Create an analog tag called ‘VALUE’ in the database.
b) Create a keypad page by choosing [File] – [New Page], then choose “Keypad Page” for the page type. On the page editor screen, select [Draw] – [Key Input Window] or select the icon, then insert the object in the keypad page. Be sure to select the tag you created as the input tag.
c) Draw touch objects in the keypad object as shown below. Your objects may appear slightly different depending on how you configure them.
d) For each object, create a ‘Key Input’ touch action, then specify the key type.
e) On a separate (normal) page, create a touch object that opens the keypad page. Select ‘Open Keypad Page’ as the action type and choose the “VALUE” tag in the ‘Tag’ field. Choose the name of the keypad page which you created for the ‘Page Name’ field.
f) Launch the project in Xpanel or in the Simulator. Open the keypad page by clicking the touch object in the main page. You may then input numeric data to change the tag value.