TDBCalendar Control > TDBCalendar Control and Object References > TDBCalendar Key Object Properties |
The TDBCalendar 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 chart describes the shortcut keys that can be used in the TDBCalendar control:
Keys |
Key Description |
---|---|
Enter |
{Enter} |
Escape |
{Escape} |
Space |
{Space} |
Help |
{Help} |
Up |
{Up} |
Down |
{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. There are keys that are used by Windows, such as [F10], [Ctrl]+[C], and so on, which will not function as the user may expect if assigned to the control.
Example Title |
Copy Code
|
---|---|
TDBCalendar.Key.Now = "^{F3}"
|
In this example, the system date will be picked up when [CTRL]+[F3] is pressed.
Example Title |
Copy Code
|
---|---|
TDBCalendar.Key.Now = "^+{F3}"/
|
In this example, the system date will be picked up when [CTRL]+[Shift]+[F3] is pressed.
Example Title |
Copy Code
|
---|---|
TDBCalendar.Key.Now = "{F2}, ^{F3}"
|
In this example, the system date will be picked up when [F2] or [CTRL]+[F3] is pressed.
There are also 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 |
Move to the previous week. |
Down |
Move to the next week. |
Enter / Space |
Select a date. |
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 key within the control will be processed first before firing the Click event of the buttons.
For more information see Key Object Properties.