How To Extend the Visual FoxPro Solutions SampleLast reviewed: February 19, 1998Article ID: Q157723 |
5.00
WINDOWS
kbusage kbprg kbprint kbhowto
The information in this article applies to:
SUMMARYThe Visual FoxPro Solutions sample can easily be extended by adding new components. This article describes the steps required to add a new form, query, view, or report to the Solutions sample.
MORE INFORMATION
Adding a New Component to Solution.dbfTo add a new component to the Solutions sample, add a new record to Solution.dbf and fill in the following fields. The Key Field: The Key field must be unique, and it must be a number followed by an underscore, 205_ for example. The Key field is used to populate the treeview control (oleTree) in Solution.scx. The Parent Field: The Parent field must match the Key value of the record for the parent node of the sample in the treeview. For example, if you want to add a new component to be displayed under "ActiveX\ActiveX Controls" in the Solution.scx treeview, replace the Parent field with 101_. A Parent of 0_ indicates that the item is added to the root level of the treeview control. The Text Field: The text you enter in the Text field is displayed in the treeview control and the filtered list view in Solution.scx. The Image Field: The Image field specifies the picture to be displayed beside the component in the treeview. If you are adding a component to be run, set the picture to "dot." To see all the images, right-click oleImages in Solution.scx and choose ImageList Control Properties. The File Field: The File field contains the name of the new sample file. The Type Field: Fill in the Type field as follows:
N -- Not a sample F -- Form V -- View Q -- Query R -- ReportThe Path Field: The path of the new sample file, relative to the directory that Solution.scx is located in. The Descript Field: The Descript field contains the description that is displayed in Solution.scx when the sample is selected in the treeview or in the list box. The Method Field (for forms only): If you want a form to be opened in design mode with a particular method opened by default, specify the method in the Method field.
Customizing a Form for the Solutions SampleQueries, reports, and views don't need any special coding to be good Solution application citizens, but forms do need a little customization.
Adding a New Component to the Filtered List ViewThe filtered list isn't a filtered list at all: the list displays one side of a many-to-many relationship. Each Solutions component can be listed under multiple "filters" and each "filter" can contain many components. The tables involved in the relationship are as follows:
Solution.dbf--The list of components Reftext.dbf--The list of "filters" and an ID Xref.dbf--A juncture table between Solution and ReftextIf your new component belongs under one or more of the existing filters, add records to Xref.dbf with the ID of the filter in Reftext.dbf and the Key value for your component from Solution.dbf. If you want to add another filter, add the new filter to Reftext.dbf.
REFERENCESFor a sample form that can be used to facilitate the adding of new components and filters to the sample, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q158051 TITLE : SAMPLE: Solution.exe Extends the Visual FoxPro Solutions SampleExtract the form Filtrlst.scx from Solution.exe. For best results, these files Filtrlst.scx and Filtrlst.sct should be placed in the Vfp\Samples\Solution directory. The form itself contains instructions about its use. All components in Solution.dbf are listed when the filter is set to "All," whether you have added your component to other filters or not.
|
KBCategory: kbusage kbprg kbprint kbhowto
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |