Accelerator

Description

The accelerator key that a user can press to select a column in the DataWindow object.

Applies to

Column controls

Syntax

Describe and Modify argument:

"columnname.Accelerator { = 'acceleratorkey ' }"

Parameter

Description

columnname

The name of the column for which you want to get or set the accelerator key.

acceleratorkey

(exp) A string expression whose value is the letter that will be the accelerator key for columnname. Acceleratorkey can be a quoted DataWindow expression.

Usage

An accelerator key for a column allows users to select a column (change focus) with a keystroke rather than with the mouse. The user changes focus by pressing the accelerator key in combination with the Alt key.


In the painter

Select the control and set the value in the Properties window, Behavior category.


Displaying the accelerator

The column does not display the key. To let users know what key to use, you can include an underlined letter in a text control that labels the column. When you enter the text control’s label, precede the character you want underlined with an ampersand (&).

Examples

Example 1

[Visual Basic]
Dim AccKey as String
dw1.SetProperty("EmpName.Accelerator","A")
AccKey = dw1.GetProperty("EmpName.Accelerator")
AccKey = dw1.Describe("EmpName.Accelerator")
dw1.Modify("EmpName.Accelerator='A'")

Example 2

[C#]
string AccKey;
dw1.SetProperty("EmpName.Accelerator","A");
AccKey = dw1.GetProperty("EmpName.Accelerator");
AccKey = dw1.Describe("EmpName.Accelerator");
dw1.Modify("EmpName.Accelerator='A'");