GrapeCity MultiRow Windows Forms Documentation
Retrieving the Input Device

You can operate a touch device using touch or a touch pen. In addition, you can also operate it using the mouse and keyboard. In MultiRow, you can retrieve information to specify which input device was used for operating the GcMultiRow control. This section explains how to get the information related to the input device.

Retrieving the Input Device

You can use the InputDeviceType property to retrieve information about the input device that is operating GcMultiRow.

Using Code

The following code retrieves the information related to the input device operating the MultiRow control.

[VB]

Console.WriteLine("Operated by {0}." , GcMultiRow1.InputDeviceType)

[CS]

Console.WriteLine("Operated by {0}." , gcMultiRow1.InputDeviceType);

Controlling the Display of Touch Keyboard

You can use the InputDeviceType property and the CellEnter event, to display the touch keyboard only in case of touch operations.

Using Code

This example displays the touch keyboard.

[VB]

Private Sub GcMultiRow1_CellEnter(sender As Object, e As GrapeCity.Win.MultiRow.CellEventArgs) Handles GcMultiRow1.CellEnter 
If GcMultiRow1.InputDeviceType = GrapeCity.Win.MultiRow.InputDeviceType.Touch 
Then ' Display the touch keyboard in case of touch operation.
GcMultiRow1.ShowTouchKeyboard() 
End If 
End Sub

[CS]

private void gcMultiRow1_CellEnter(object sender, GrapeCity.Win.MultiRow.CellEventArgs e)
{ 
if (gcMultiRow1.InputDeviceType == GrapeCity.Win.MultiRow.InputDeviceType.Touch) 
{ // Display the touch keyboard in case of touch operation.
gcMultiRow1.ShowTouchKeyboard(); 
} 
}
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options