共用方式為


Using AutoComplete with Input Panel

Windows Vista introduces AutoComplete capabilities in Tablet PC Input Panel. As Input Panel recognizes handwriting, it can feed the partially written string to any AutoComplete list that's provided by a text control. To create an integrated look, the AutoComplete list appears adjacent to Input Panel. The user can complete the entry by clicking the AutoComplete item.

Users highly appreciate AutoComplete lists. The value is arguably greater for pen users because AutoComplete saves them time correcting incorrectly recognized text.

As shown in the following illustration, an AutoComplete list appears as a user writes a web address.

 

auto-suggested list in TIP

auto-suggested list in TIP

 

In the character pad, AutoComplete occurs after the user enters each character. In the writing pad, AutoComplete occurs after Input Panel recognizes each word. If an item in the AutoComplete list matches the text that the user wants to enter, he can tap the suggestion to enter it. Or, he can handwrite the remaining characters and then tap the Insert button.

Using AutoComplete with the standard text controls

Input Panel is tightly integrated with AutoComplete functionality, which is exposed by the text editing controls in the Microsoft .NET Framework 3.0, including the TextBox, ComboBox, and DataGrid text controls.

You can use the standard AutoComplete lists (defined by the AutoCompleteSource enumeration), which include URLs from the browser history list, URLs recently typed in the shell, file and folder names from the file system, among others. You can also define your own lists by using any collection of strings that you assign to the text control.

Using AutoComplete in a custom text-entry interface

If you're not using the standard text editing controls, you can still hook into the AutoComplete functionality that Input Panel provides. There are two interfaces involved in integrating AutoComplete with Input Panel:

  • ITipAutocompleteProvider Interface. Input Panel calls this interface when it's ready to display the AutoComplete list, and when it has recognized text to send for lookup.
  • ITipAutocompleteClient Interface. Implemented by Input Panel, this interface negotiates the position of the AutoComplete list and notifies Input Panel that the user has selected a list item.

Input Panel dictates the positioning and timing of the AutoComplete display. Your application provides the list of suggestions, the visual display, and the list interaction. When possible, Input Panel tries to position the AutoComplete list above Input Panel so that it's not covered by the user's hand. It tries to position it adjacent to the writing area, and left-aligned with the handwriting.

 

 

Send comments about this topic to Microsoft

Build date: 2/8/2011