Tuto WINDEV 25

Part 4: Full application with data 147 5.  In the code window that appears, write the following WLanguage code in the "Click" event: fImageSelect( 6.  The code editor proposes a code wizard. • Click "Wizard for function fImageSelect". • The code wizard starts. Remark WINDEV proposes several code wizards that will generate the corresponding code lines via simple questions. Don’t hesitate to use them, you will avoid syntax errors. 7. Keep all the default options proposed by the wizard and validate. The corresponding WLanguage code is automatically entered. sFile is string // Opens the image picker sFile = fImageSelect(“”, “”, “Select an image...”) 8. Add the following WLanguage code: // If a file was selected IF sFile <> “” THEN // Assigns the image to the Image control IMG_Visual = sFile END This WLanguage code is used to assign the selected file to the Image control in the window. 9. Close the code editor (click the cross in the top right corner of code window). This feature will be checked when the management of modifications performed in the form is completed. Validate the product modifications Two Buttons controls have been created in the "WIN_Product_form" window: • a "Validate" Button control to manage the validation of modifications, • a "Cancel" Button control to manage the return to the product list. We are now going to type the WLanguage code required for them to operate. ▶ First of all, display (if necessary) the "WIN_Product_form" window in the editor: click the corresponding button in the open documents bar.

RkJQdWJsaXNoZXIy NDQ0OA==