AutoCompleteby David Martinko
CompatibilityVDF 11.1 tested and approved also works with VDF 8.x, 9.x, 10.x DefinitionWelcome to one of my latest contributions! This is by far one of the best things I have the pleasure of sharing with the rest of the VDF Community. What is does: Simply, it displays information from a datafile based on what you typed. For advanced users, the list can be filled manually. How it works: It is connected to a datadictionary. When you stop typing, it will take what you have typed and search for any records that start with the same data in the field. Each record it finds that matches the constraints will then be displayed in the list. The user can then select a record from the list. Why it is better than a comboform: You can tell it which fields to display. You can even choose fields from a parent file. It will use constraints you have placed in the DD. Fields will show using the Field_Masking defined by you in the DD. It popups up based on what you typed and is soooo fast! Special features: It will treat numeric fields like an ascii field for searching purposes (example: "43" would find any numeric value beginning with "43". The following numbers are valid finds "43, 431,432,43918".) There is a delay from the last key pressed and when the list pops up. You can control this delay if you wish. There is a property for the maximum number of finds. This will abort the searching after the max number of matching finds has been done (helpful if the user searches for common data). There is a property that will allow the user to find all data GT the entered value (example: "C" would find any values starting with "C" or a character GT 'C". The following values are valid finds "C, CA, DE, Z"). You can toggle the autocomplete option on/off as needed. This means you can customize on a per user basis, or allow/disallow it based on other criteria. When an item is selected from the list, you have full control over what happens. I give you the method to retrieve the value of the selected record. This means you can make the record active in the buffer or default the value only. Titles can be displayed for the columns in the list. There is a property which controls how many records are found. Another property controls how many records are displayed at a time. If more records are found than you have chosen to display, a scrollbar will appear within the list. Users can pageup, pagedown, arrowup or arrowdown through the list. InstallationWe will describe here how-to install this package into the orderentry workspace
UsageThe DFO contains all the same code you should need. A sample view is also provided for the Order Entry Sample Workspace. Register the sample view and begin using the control immediately. Just drag a new DBGrid_Autocomplete, DBForm_Autocomplete, or Form_Autocomplete onto your view and look at the code defaulted inside the object for you. You must set the index to use. You must add fields to the autocomplete. You must augment the Procedure Accepted if you want something to happen when the user makes a selection. Beyond that, there is nothing else you need to do in order to get the sample working. It only supports DF_BCD and DF_ASC field types. I didn't feel dates would be efficient and needed. Minimum Requirements are VDF8. |
|||||||||||
Copyright © 1999 - 2024 VDF-GUIdance on all material published, for details see our Disclaimer. |