Tuto WINDEV Mobile 25

58 Part 3: iOS application Remark To modify the name and caption of the Button control, we have been using the control description window (also called "7-tab window"). The control name and caption can also be modified from the window currently being edited: 1. Click the control to select it. 2. Press the Enter or Space key: the caption becomes editable. 3.  Type the new caption and validate. ▶ Validate the control description window ("OK" button). The new control caption appears in the window editor. ▶ We are going to display a message in a dialog box (a small window proposed by the system). To do so, we will be using our first WLanguage function: Info . Remark The programming language supplied with WINDEV Mobile is named WLanguage. It is a 5th-generation language (5GL) that includes highly sophisticated commands. 1. Select the control if necessary. Remarks: • When the control is selected, several handles appear around the control. • To select the edit control, all you have to do is click it with the mouse. 2. Display the popup menu of control (right mouse click on the control). 3. Select "Code". This option opens the code editor of WINDEV Mobile, in which all WLanguage statements can be typed. Remark The code editor proposes different events for each type of control. These are the events related to the control. Therefore, two events are displayed for the "Button" control: • Initializing, run when displaying the window. • Click, run when the user clicks on the control. Remark: Additional events can be added if necessary. 4. Write the following code In the "Click" event of the "BTN_Display" control: Info("Hello")

RkJQdWJsaXNoZXIy NDQ0OA==