Tuto WEBDEV 25

444 Part 13: The WLanguage basics Creating the page ▶ Create a new blank page: 1. Click among the quick access buttons. The window for creating a new element is displayed: click "Page" then "Page". The page creation wizard appears. 2. Select "Blank". 3. Make sure that "Responsive Web Design mode" is unchecked. 4. Validate. The page is automatically created in the editor. The window for saving an element is displayed. 5. Specify the page title: "Conditional statements". The page name ("WIN_Conditional_ statements") is automatically proposed. 6. Click on the "OK" to validate the information displayed in the save window. Creating the page controls for the conditional IF statement Two controls must be created: • a Check Box control, to display (or not) the "Close" Button control. • a "Close" Button control, to close the browser window. ▶ To create the Check Box control: 1. On the "Creation" pane, in the "Usual controls" group, click "Check Box" then click the position where the control will be created (at the top of the page for example) 2. Click the control that was just created: the "Option 1" caption becomes editable. 3.  Type the option caption: "Make the closing button visible". 4. Press Enter to validate the input. ▶ To create the "Close" Button control: 1. On the "Creation" pane, in the "Usual controls" group, click . 2. Click the location where the Button control will be created (below the Check Box control for example). 3. Click the control that was just created. The text displayed in the button becomes editable. Type the caption: "Close". 4. Press Enter to validate the input. ▶ This Button control allows you to close the browser window. We are going to type the corresponding WLanguage code: 1. Select the "Close" Button control. 2. Press F2: the code editor displays the events associated with the control. 3. Write the following code in the event "Click on BTN_Close (browser code)": BrowserClose() BrowserClose is used to close the current window of Internet browser. 4. Close the code editor.

RkJQdWJsaXNoZXIy NDQ0OA==