Tuto WINDEV 25
146 Part 4: Full application with data Managing the product modification We are now going to modify the "WIN_Product_form" window in order to manage the product modification. We are going to: • allow the user to modify the product image. • add Button controls to save or cancel changes made in the product form. Modifying the product image The user will be able to modify the product image in the Product form. To do so, we are going to create a "Modify" Button control below the product image. This control will open a file picker to select the desired image. ▶ First of all, display (if necessary) the "WIN_Product_form" window in the editor: click the corresponding button in the open documents bar. ▶ To create the Button control to modify the image: 1. On the "Creation" pane, in the "Usual controls" group, expand "Button". Enter "Modify" in the search box at the top of the list of preset Button controls. Click "Modify button". 2. The shape of the control appears under the mouse pointer. Click in the window, below the product image. 3. If necessary, resize the Button control (using the handles) so that the control has the same width as the Image control. Remark When resizing the control, an automatic magnetism effect simplifies the alignment of Button control with the Image control. 4. Right-click on the Button control. Select "Code" from the menu that is displayed.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==