Tuto WINDEV 25

62 Part 2: The WLanguage basics ▶ Let’s now run the window test: 1. Click among the quick access buttons (or press F9). The window is run. 2.  In the window in execution, click the check box. The "Close" button becomes visible. 3. Click the "Close" button: the window is closed and the window editor is displayed. Creating the window controls for the conditional SWITCH statement Two controls must be created: • a Radio Button control used to select the value to check. • a Button control used to run the test. ▶ To create the Radio Button control: 1. On the "Creation" pane, in the "Usual controls" group, expand "Radio button" (click the arrow). The list of default Radio Button controls appears. 2.  In the search box at the top of the list of controls, enter "Title". Click the first proposed control (with "M"). 3. Click inside the window to create the control (below the Check Box control created beforehand for example). ▶ To create the "Test" Button control: 1. On the "Creation" pane, in the "Usual controls" group, click . 2. Click the location where the control will be created (on the right of Radio Button control, for example). 3. Click the control that was just created. The text displayed in the control becomes editable. Type the caption: "Test". 4. Press Enter to validate the input. SWITCH statement In our example, the "Test" button is used to check the selected value and display a message. ▶ We are going to enter the WLanguage code associated with the "Test" Button control: 1. Select the "Test" Button control. 2. Press F2. 3. Write the following WLanguage code in the "Click BTN_Test" event: SWITCH RADIO_Abbreviated_Titles

RkJQdWJsaXNoZXIy NDQ0OA==