ComponentOne List 8.0 for ActiveX
Tutorial 2 - Incremental Search and Auto Completion with True DBCombo

This tutorial demonstrates the incremental search facility of the True DBCombo control. When the control receives focus, any keys the user types are concatenated into a search argument, and the list portion of the control instantly highlights the next matching entry, if found.  You can also enable the AutoCompletion property to cause the remainder of the matching entry to be appended to the combo's text box.

  1. Start a new project.

  2. Place a Data control (Data1) and a True DBCombo control (TDBCombo1) on the form (Form1) as shown in the following figure.

  3. Set the DatabaseName (Data control) property of Data1 to TDBLDemo.mdb, and the RecordSource (Data control) property to Composer.

  4. Set the RowSource property of TDBCombo1 to Data1, the ListField property to Last and the MaxComboItems property to 8.

Run the program and observe the following:

Run the program again and observe the following:

Open the list portion of TDBCombo1 as described earlier. Note that with each letter you type, TDBCombo1 now fills in the text box with the rest of the matching last name, if any.Also, the part that was filled in is selected. For example, if you type be, the letters ethoven will be added and selected. Experiment by pressing the Del and Backspace keys.

To end the program, press the End button on the Visual Basic toolbar. You have successfully completed Tutorial 2.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback