Tuto WINDEV Mobile 25

134 Part 5: Android and iOS: Developing an application ▶ To modify the Static control of third line found in the Multiline Zone control: 1. Click the Static control in the third row. 2. Open the description window (double-click the control). 3.  In the description window "General" tab: • Give a name to the control ("STC_Exit" for example). • Change the caption ("Exit from the application" for example). 4. Validate the description window. Programming the menu ▶ Finally, we will write the WLanguage code necessary to perform each action in the menu: 1. Right-click the Multiline Zone control and select "Code". Caution : make sure you select the Multiline Zone control and not one of the controls belonging to it. 2.  In the code editor, type the following WLanguage code in the event "Selection (click) of a line in...": SWITCH MZ_MENU CASE 1 // List of products OpenMobileWindow(WIN_List_of_products) CASE 2 // Map of stores OpenMobileWindow(WIN_Map_of_stores) CASE 3 // Exit from the application Close() END 3. Save the modifications by clicking among the quick access buttons. 4. Close the code window (click X at the top right corner of code editor). Application test The last step consists in specifying that the menu window is the first application window. To do so, we are going to run a full project test and define the first project window. ▶ To define the first project window: 1. Select the "WIN_Menu" window in the "Project explorer" pane. 2. Display the popup menu. 3. Select "First project window". A specific icon (with a small 1) is displayed in front of the window name, in the "Project explorer" pane. Until now, the test of windows was run individually by clicking among the quick access buttons. ▶ To start the project test on the simulator: 1. Click among the quick access buttons. 2. Your project starts with the menu window. Click an option of your menu to check whether the different links are correct.

RkJQdWJsaXNoZXIy NDQ0OA==