Tuto WINDEV 25
Part 4: Full application with data 269 • On the "Details" tab, the component description as well as the help that was automatically generated. This allows you to identify the re-usable component elements. Remark The component description can be accessed at any time. Simply select the component in the "Project explorer" pane and select the "Description" option from the popup menu. In this case, you also have the ability to define the load mode of component. 8. Validate ("Close" button). The component is included in your project. ▶ We are now going to create a blank window to use the component. 1. Create a blank window. • The window title is "Customers by city". • The window name is "WIN_Customers_by_city". • Save. 2. Display the WLanguage events associated with the window ( "Code" from the popup menu). 3. We are going to call the DataLocation function of component in the "End of initialization" event. This function expects in parameter the path used to access the data files handled by the component. Type the access path to the data found in the "WD Full Application" example. For example: DataLocation(...// Specify the path of YOUR data "C:\WINDEV\Tutorial\Exercises\" + ... "WD Full Application\Exe") Remark If your project is using another procedure named "DataLocation", the name of component procedure must be prefixed by the name of the set of procedures used. The code becomes: SET_Component.DataLocation(... 4. Close the code editor. 5. Add the following controls into the window: • A text Edit control whose caption is "City" and whose name is "EDT_City". • A Table control named "TABLE_Result", filled by programming and that includes 2 columns: • a "Name" column of Text type. • a "Total sales" column of Currency type. • A Button control whose caption is "Search" and whose name is "BTN_Search".
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==