| Windows 7 Control Pack for WinForms Task-Based Help > C1TaskDialog Task-Based Help > Adding Command Link Buttons |
Command links have a clean, lightweight appearance that allows for descriptive labels, and are displayed with either a standard arrow or custom icon, and an optional supplemental explanation. For more information, see the Command Links topic. In this topic, you'll add a command link button 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 to an existing C1TaskDialog control:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim C1CustomButton1 As New C1.Win.C1Win7Pack.C1CustomButton
C1CustomButton1.Text = "Command Link Example"
C1CustomButton1.Note = "This button is a custom command link."
C1TaskDialog1.CustomButtons.Add(C1CustomButton1)
End Sub
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
public Form1()
{
InitializeComponent();
C1CustomButton c1CustomButton1 = new C1CustomButton();
c1CustomButton1.Text = "Command Link Example";
c1CustomButton1.Note = "This button is a custom command link.";
c1TaskDialog1.CustomButtons.Add(c1CustomButton1);
}
|
|
In this topic, you've added a command link button to an existing C1TaskDialog control.