The Quick Access Toolbar (QAT) can grow to accommodate as many commands as needed. To add items to the QAT, use the smart designer or add code. Each option is described below.
Complete the following steps:


To add Ribbon items (for example, Save, Undo, and Repeat) to the QAT, add the following code to your project:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
' include the Imports directive for the namespace
Imports C1.Win.C1Ribbon
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.save))
C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.undo))
C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.repeat))
End Sub
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
// include the using directive for the namespace
using C1.Win.C1Ribbon;
private void Form1_Load(object sender, System.EventArgs e)
{
C1Ribbon1.Qat.Items.Add (new RibbonButton (Properties.Resources.save));
C1Ribbon1.Qat.Items.Add (new RibbonSplitButton (Properties.Resources.undo));
C1Ribbon1.Qat.Items.Add (new RibbonButton (Properties.Resources.repeat));
}
|
|