TDBNumber Control > TDBNumber Control and Object References > TDBNumber Key Object Properties |
The TDBNumber control's Key:controls object property is used to determine the shortcut keys to use in the control. Also, keys can be combined using the shift status keys. The following table describes the shortcut keys that can be used in the TDBNumber control:
Keys |
Key Description |
---|---|
Enter |
{Enter} |
Escape |
{Escape} |
Space |
{Space} |
Help |
{Help} |
Up arrow |
{Up} |
Down arrow |
{Down} |
A – Z |
{A} – {Z} |
F1 – F12 |
{F1} – {F12} |
Combination Keys |
Key Description |
---|---|
Ctrl |
^ |
Shift |
+ |
Ctrl + Shift |
^+ |
A maximum of five keys can be set in the shortcut key property. When setting multiple keys, use a comma (“,”) as a delimiter.
Example Title |
Copy Code
|
---|---|
TDBNumber.Key.Clear = "^{F3}"
|
In this example, the contents of the control will be cleared when [CTRL]+[F3] is pressed.
Example Title |
Copy Code
|
---|---|
TDBNumber.Key.Clear = "^+{F3}"
|
In this example, the contents of the control will be cleared when [CTRL+[Shift]+[F3] is pressed.
Example Title |
Copy Code
|
---|---|
TDBNumber.Key.Clear = "{F2}, ^{F3}"
|
In this example, the contents of the control will be cleared when [F2] or [CTRL]+[F3] is pressed.
There are keys that are used by Windows, such as [F10], and so on, which will not function as the user may expect if assigned to the control. The following table is the list of these keys or combination keys:
Keys |
Key Description |
---|---|
F1 |
Start up Windows help. |
F10 |
Menu. |
Help |
Start up Windows help. |
Shift+F1 |
Show What’s this. |
Shift+F10 |
Popup the context menu. |
Ctrl+Shift+Esc |
Start up WindowsNT Task Manager (NT only). |
Ctrl+Esc |
Start up the Start Menu. |
There are also keys that are used by the control, such as the Up arrow key, and so on for particular features. But these keys will be overridden if once assigned to the control using the Key object. The following table describes these keys:
Keys |
Key Description |
---|---|
Up arrow |
Increment. |
Down arrow |
Decrement. |
Ctrl+C |
Copy text. |
Ctrl+X |
Cut text. |
Ctrl+V |
Paste text. |
Ctrl+A |
Select all text. |
Ctrl+Z |
Cancel all entry and restore text, cursor position and highlight settings. |
Note: A-Z and the Space character will also be overridden if specified as the decimal point character. |
If you assign the ENTER or the ESC key when a default or a cancel button is placed on a form, the ENTER and the ESC keys within the control will be processed first before firing the Click event of the buttons.
All printable characters that are assigned to the Key object properties will be overridden; the assigned task will be performed when the key is pressed, instead of the key's character being entered into the control.
All of the properties for the Key object are documented in the following reference section: