Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incremental search in combo-box?
Message
From
10/10/2002 07:34:09
 
 
To
09/10/2002 20:10:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00709627
Message ID:
00709751
Views:
39
Hi Dan.

I have created a combo-box based class that is Rowsourced on a SQL query. If the user enters a value that does not exist in the list, it asks the user if they want to add it and, if so, pops up a modal screen allowing them to do so.

We have a quicken style quick fill combo in Chapter 5 of 1001 Things You Wanted to Know About VFP. Furthermore, we have subclassed this combo to pop up a data entry form to use for adding new entries to the lookup table that is the combo's RowSource (How many tables to you have that have only 2 fields < vbg > ?)

Quickfill combos (Example: CH05.VCX::cboQFill)
One example of quickfill methodology (and a more detailed explanation of just what "quickfill" is) was presented in Chapter 4 in the incremental search TextBox. This methodology is even easier to implement for the ComboBox class. Quickfill combo boxes give your forms a polished and professional look. They also make the task of selecting an item in the list much easier for the end user. Just type the letter 'S' in the text portion of the combo, and 'Samuel' is displayed. Next type the letter 'm' and the DisplayValue changes to 'Smith.' Very cool stuff!

How do I add new items to my combo and list boxes? (Example: CH05.VCX::cboAddNew and lstAddNew)
Although it is simple enough to add a new item to a DropDown Combo, this simplistic solution may not be adequate. If the only requirement is to add a new description along with its primary key to a lookup table, the methodology discussed above is up to the task. Much of the time, however, a lookup table contains more than two columns. (For example, the lookup table provided with the sample code for this chapter has a column for a user-defined code.) Additional fields may also need to be populated when a new item is added to the combo box.

Actually, now that I come to think of it, Chapter 5 is one of the sample chapters for KiloFox, so you can download the text from the Hentzenwerke web site. Although you won't have the complete source code, the text in the chapter contains much of the code and explains the methodolgy in detail.
Previous
Reply
Map
View

Click here to load this message in the networking platform