ComponentOne True DBGrid Pro 8
KeyPress Event

 

KeyPress Event

Occurs when an ANSI key is pressed and released.

Syntax

object_KeyPress (KeyAscii As Integer)

Arguments

KeyAscii is an integer representing an ANSI key code. KeyAscii is passed by reference; changing it sends a different character to the grid. Changing KeyAscii to 0 cancels the keystroke so the grid receives no character.

Remarks

The KeyPress event occurs when the user presses and releases one of the following kinds of keys:

·      A printable keyboard character.

·      The Ctrl key combined with an alphabetic or special character.

·      The Enter or Backspace key.

Use the KeyPress event to test keystrokes for validity or to format characters as they are typed.

See Also

TDBGrid Control

TDBDropDown Control

 

 


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

Product Support Forum  |  Documentation Feedback