Tuto WINDEV Mobile 25
202 Part 6: Windows Mobile application 3. If necessary, resize the Button control (using the handles) so that the caption is fully displayed. 4. The WLanguage code of this Button control will allow you to open the "Product form" window an to reset its controls. To write this code: • Right-click the "New product" Button control. • Select "Code" from the popup menu that is displayed. • Write the following code in the "Click" WLanguage event: HReset(Product) Open(WIN_Product_form) TableDisplay(TABLE_Product) • HReset initializes the item variables in the Product data file with the default values to manage a new record. • Open is used to open the form window. • TableDisplay is used to update the content of Table control: the new record will be displayed in the control. 5. Save the modifications by clicking among the quick access buttons. 6. Close the code window (click X at the top right corner of code editor). ▶ We are now going to modify the window of product form to manage the addition of a new record. 1. Open the "WIN_Product_form" window in the editor.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==