Freigeben über


About the Pen Input Panel

About the Pen Input Panel

In Microsoft® Windows® XP Tablet PC Edition Software Development Kit (SDK) version 1.0, the system-level Tablet PC Input Panel provides a universal mechanism to accomplish text input across the Windows platform, but it does not provide programmatic access. Starting with the Tablet PC SDK version 1.5, the PenInputPanel object enables you to integrate text input tools directly into your applications, and it provides a level of control not previously available.

The following graphic shows the pen input panel displayed over the Auto Claims Form Sample sample.

tpcsdkua_tpc_pip_autoclaim.jpg

The PenInputPanel object is convenient for application developers. There is no need to replace controls on existing forms. You can simply attach PenInputPanel objects to existing controls that receive text input, and they can begin receiving input from the PenInputPanel object.

The PenInputPanel object adopts the settings from the Input Panel for the following properties:

  • Layout
  • Ink thickness
  • Recognition timeout
  • Box size, send mode, and other settings specific to East Asian boxed input

The PenInputPanel object does not provide access to the underlying ink. To get the ink, use the InkPicture control.

The PenInputPanel object provides an in-place user interface (UI) that is easily discoverable by end users of your applications. It is automatically activated when the user taps on a window with a PenInputPanel object using the tablet pen. The pen input panel appears automatically when the system detects a CursorButtonUp event for the window to which the PenInputPanel object is attached. Automatic activation can be disabled by setting the PenInputPanel.AutoShow property to false.

The pen input panel does not appear automatically on mouse events. Pen events are converted to mouse events when using Terminal Services. The PenInputPanel object does not work over a Terminal Services connection.

Pen Input Panel Input Modes

The PenInputPanel object allows either keyboard functionality or handwriting input, with additional keypads to assist input. The UI to the pen input panel include:

  • Writing pad
  • Writing pad for East Asian languages
  • QuickKeys keypads
  • In-place keyboard

The availability of the writing pad versus the writing pad for East Asian languages depends on the user's default locale setting in the operating system.

Writing Pad

The writing pad resembles the familiar Input Panel UI.

The writing pad collects handwriting from the end user. The basic UI includes a single writing line on which the user can write text with a digital pen. When the user finishes writing and either taps the Send button or waits for a timeout to occur, handwriting is sent to the recognizer.

Ink is recognized after a specified amount of time has elapsed since the time the last ink stroke was collected. When the timeout occurs, ink is removed from the collection surface and recognition occurs. The recognized text is then inserted into the control to which the PenInputPanel object is attached.

East Asian Multibox Pad

The East Asian version of the pen input panel displays a multibox interface for entering Asian characters. It provides alternatives and is similar to the Input Panel UI. Users can correct mis-recognized characters by tapping on a writing box and selecting the correct character from a list of alternates in the bar across the top of the pen input panel. Filter buttons are available to narrow the list of alternates to specified types of characters, such as symbols.

The Korean and Japanese versions of the writing pad have a conversion key in addition to the mini quick keys that are common to all language skins.

To get Latin characters in the writing pad for East Asian languages, set the PenInputPanel.Factoid property to increase the accuracy of Latin character recognition. Set the Digit factoid for numeric characters or the OneChar factoid for alphabetic and numeric characters.

QuickKeys Keypads

The pen input panel provides two small keypads for entering symbols and numbers.

In-place Keyboard

The pen input panel provides a keyboard mode for situations where handwriting recognition is not sufficient. For instance, when entering a password or part number, users are likely to have more success using the pen input panel keyboard than they would the writing pad. This is because passwords or part numbers are unlikely to be in the writing pad's recognizer dictionary.

Recognizer Support

The PenInputPanel object supports all shipping recognizers. This includes Windows XP Tablet PC Edition version 1.0 and the Tablet PC SDK version 1.5 recognizers.

Automatic Positioning

By default, the pen input panel is automatically positioned relative to the control to which it is attached. It does not overlap the control unless there is not enough screen real estate for both the pen input panel and the control, or unless the developer sets the pen input panel's position explicitly.

Automatic positioning functions only when the developer has not explicitly set the position using the MoveTo method. To override automatic positioning, change the values of the PenInputPanelMovingEventArgs.Top and PenInputPanelMovingEventArgs.Left properties in a PanelMoving event handler.

The position of the pen input panel is constrained by the edges of the screen. No edge of the pen input panel can be closer than 0.25 inches from any border of the screen.

By default, the top of the pen input panel appears at the bottom of the control to which it is attached and is separated from the control by the value of the VerticalOffset property. If there is not enough room below the control, the bottom of the pen input panel appears at the top of the control to which it is attached and is separated from the control by the value of the VerticalOffset property. If there is still not enough room, as in the case of a full-screen edit control, the pen input panel overlaps the control.

The left edge pen input panel appears at the left edge of the control to which it is attached and is separated from the control by the value of the HorizontalOffset property, except as bounded by the screen. If the desired position places the pen input panel beyond the available screen boundaries, the pen input panel assumes the nearest possible horizontal position.

Forced Overlap

It is sometimes necessary for the pen input panel to overlap the attached control, as in the case of a full-screen edit control. In such cases, automatic positioning of the pen input panel is determined using the following rules:

  • When the insertion point is in the top half of the attached control, the vertical position of the pen input panel is at the bottom of the screen, possibly placing it over the bottom portion of the control.
  • When the insertion point is in the bottom half of the attached control, the vertical position of the pen input panel is at the top of the screen, possibly placing it over the top half of the control.

Windowless Controls

In the case where a PenInputPanel object is attached to a windowless control, the pen input panel is positioned relative to the parent of the windowless control. Set the PenInputPanelMovingEventArgs.Top and PenInputPanelMovingEventArgs.Left properties in a PanelMoving event handler or use the MoveTo method to manually position the pen input panel.