Tuto WINDEV 25

Part 2: The WLanguage basics 63 4. When the Enter key is pressed to go to the next line, the code editor automatically displays the different SWITCH capabilities: 5. Write the following WLanguage code: SWITCH RADIO_Abbreviated_Titles // Mr CASE 1 Info("You’ve selected Mr") // Mrs CASE 2 Info("You’ve selected Mrs") // Miss CASE 3 Info("You’ve selected Miss") // Other CASE 4 Info("You’ve selected Other") END Let’s take a look at this WLanguage code: • RADIO_Abbreviated_Titles corresponds to the name of the Radio Button control. • The Radio Button control is a control proposing several options (4 in our case). A single option can be checked at a time. The Radio Button control corresponds in programming to an Integer variable. Each menu option is associated with a value. If this option is checked, the Radio Button control takes for value the identifier of checked option. • This code tests the value of the Radio Button control. A message is displayed according to the value of Radio Button control. 6. Close the code window (click X at the top right corner of code editor).

RkJQdWJsaXNoZXIy NDQ0OA==