Gesture event
Description
Occurs when an application gesture recognized by the control
is completed. A gesture is
a stroke or series of strokes that is recognized by the application
as indicating an action. This event can only be triggered on a Tablet
PC.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_inkegesture |
InkEdit |
|
pbm_inkpgesture |
InkPicture |
Parameters
|
Argument |
Description |
|---|---|
|
gest |
Integer identifying |
Return Values
Boolean. Return false to
accept the gesture and true to ignore it.
Usage
The Gesture event is triggered only on a Tablet PC. On a Tablet
PC, the InkEdit control recognizes the following gestures that represent
keystrokes that are frequently used in edit controls. To ensure
that the gestures are recognized, users should draw straight lines
and sharp right angles without removing the stylus from the control.
InkEdit controls on other computers behave as MultiLineEdit controls
and cannot accept ink input from a mouse.
|
Gesture |
Gesture name |
Argument value |
Keystroke |
|---|---|---|---|
|
|
Left |
0 |
Backspace |
|
|
Right |
1 |
Space |
|
|
UpRightLong |
2 |
Tab |
|
|
DownLeftLong |
3 |
Enter |
|
|
UpRight |
4 |
Tab |
|
|
DownLeft |
5 |
Enter |
On a Tablet PC, the InkPicture control recognizes the following
gestures that are equivalent to mouse clicks:
|
Gesture name |
Argument value |
Mouse action |
|---|---|---|
|
Tap |
1 |
Left Click |
|
Double Tap |
2 |
Left Double Click |
When you tap the stylus or click a mouse in an InkPicture
control on a Tablet PC, the Gesture event is triggered. On other
computers, a mouse click triggers the Stroke event. The CollectionMode
property must be set to GestureOnly! for a double tap to be recognized.
Only single-stroke gestures are recognized when CollectionMode is
set to InkAndGesture!. If a gesture is not recognized, the value
of the argument is 0.
Examples
This code in the Gesture event of an InkEdit control
confirms to the user that the gesture was recognized:
|
1 |
CHOOSE CASE gest<br>   CASE 0<br>      MessageBox("Gesture recognized",  &<br>         "You entered a space")<br>   CASE 1<br>      MessageBox("Gesture recognized",  &<br>         "You entered a backspace") |
|
1 |
   CASE 2,4<br>      MessageBox("Gesture recognized",  &<br>         "You entered a tab")<br>   CASE 3,5<br>      MessageBox("Gesture recognized",  &<br>         "You entered a return")<br>END CHOOSE<br> <br>return false |





