Tuto WINDEV 25
144 Part 4: Full application with data Displaying the form from the list of products Now, let’s see how to display the form of the product selected in the list of products. The principle is straightforward: the user will select the product in the Table control and display the product details via a Button control. ▶ We are going to modify the "WIN_Menu" window to create a modification Button control: 1. Position the cursor on the "Menu" window: click "WIN_Menu" in the open documents bar: 2. At this time, the Table control occupies the entire window. Enlarge the window to the right via the sizing handles. 3. Reduce the size of Table control: • Hold the Shift key down. • Reduce the Table control via its sizing handles. Remark Pressing the Shift key allows you to ignore the anchoring options of controls during the resize operation. 4. We now have space on the right to create the Button control that will allow us to view the selected product in the Table control. ▶ To create the Button control to view the product: 1. On the "Creation" pane, in the "Usual controls" group, expand "Button" (click the arrow found below ). 2. Enter "Modify" in the search box at the top of the list of preset Button controls. Click "Modify button". The shape of the control appears under the mouse pointer. Then, click on the right of the Table control to create the Button control. 3. Right-click the control that was just created. Select "Code" from the menu that is displayed. 4. In the code window that appears, write the following WLanguage code in the "Click" event: Open(WIN_Product_form)
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==