[]
An access key is an underlined character in the text of a menu, menu item, or the label of a control such as a button. With an access key, the user can "click" a button by pressing the ALT key in combination with the predefined access key. For more information, see the Access Keys topic. In this topic, you'll add a custom button with an access key to an existing C1TaskDialog control.
Complete the following steps to add a command link button with an access key to an existing C1TaskDialog control:
Complete the following steps to add a command link button with an access key to an existing C1TaskDialog control:
The following code adds a command link button with an access key to an existing C1TaskDialog control:
To write code in Visual Basic
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
C1TaskDialog1.UseCommandLinks = False
Dim C1CustomButton1 As New C1.Win.C1Win7Pack.C1CustomButton
C1CustomButton1.Text = "&Access Key Example"
C1TaskDialog1.CustomButtons.Add(C1CustomButton1)
End Sub
To write code in C#
public Form1()
{
InitializeComponent();
c1TaskDialog1.UseCommandLinks = false;
C1CustomButton c1CustomButton1 = new C1CustomButton();
c1CustomButton1.Text = "&Access Key Example";
c1TaskDialog1.CustomButtons.Add(c1CustomButton1);
}
In this topic, you've added a custom button with an access key to an existing C1TaskDialog control. Run your application, and when the C1TaskDialog dialog box is open press the ALT + A keys to "click" the button.