Tuto WINDEV Mobile 25
Part 6: Windows Mobile application 183 ▶ Modify the control characteristics by entering the following information: 1. This control is named: "BTN_Display". 2. The control caption is: "Display" ▶ Validate the control description window ("OK" button). The control 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 a control, simply click on it. 2. Display the popup menu of control (right mouse click). 3. Select "Code". This option opens the code editor of WINDEV Mobile, where all WLanguage statements can be typed. 4. Write the following code In the "Click" event of the "BTN_Display" control: Info("Hello") Note about the assisted input : As soon as the first two characters are typed, WINDEV Mobile proposes all words of WLanguage vocabulary containing these characters. The assisted development is a very powerful feature. No more mistakes when entering the name of an element: the syntax errors are reduced. All you have to do is select the requested word and press Enter to validate. You can focus on the algorithm. Remark When writing this code in the code editor, you may have noticed that the different elements use different colors. This is the syntactic coloring. The code editor allows you to easily identify the different elements handled by the code: • the WLanguage functions are colored in blue, • the character strings (between quotes) are colored in purple, • the names of controls are colored in cyan. These colors can be modified element by element in the options of code editor (on the "Home" pane, in the "Environment" group, expand "Options" and select "Options of the code editor").
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==