| Ribbon for WinForms Task-Based Help > Adding Ribbon Items > Adding Items to the Hot List |
The hot item list, which includes a list of items to add to the Quick Access Toolbar at run time, is available at run time by clicking the Quick Access Toolbar's drop-down arrow. Items added to the hot item list at design time appear in the Customize QAT menu at run time:
Complete the following steps:

The combo box is added to the hot list.
![]() |
Note: In the following example embedded resources containing the following images are used: NewBtn.png and OpenBtn.png. To embed a resource, from the Project menu, choose YourProjectName Properties. From the Resources tab, select Add Resource and choose to add an existing file or add a new one. |
Complete the following steps:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
' type 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
' add items to the hot list
Dim NewFileRibbonBtn As RibbonButton = New RibbonButton()
Dim OpenFileRibbonBtn As RibbonButton = New RibbonButton()
C1Ribbon1.Qat.MenuItems.Add(NewFileRibbonBtn)
C1Ribbon1.Qat.MenuItems.Add(OpenFileRibbonBtn)
' set some properties for the hot list items
NewFileRibbonBtn.SmallImage = My.Resources.Resources.NewBtn
NewFileRibbonBtn.Text = "&New"
OpenFileRibbonBtn.SmallImage = My.Resources.Resources.OpenBtn
OpenFileRibbonBtn.Text = "&Open"
End Sub
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
// type the using directive for the namespace
using C1.Win.C1Ribbon;
private void Form1_Load(object sender, System.EventArgs e)
{
// add items to the hot list
RibbonButton NewFileRibbonBtn = new RibbonButton();
RibbonButton OpenFileRibbonBtn = new RibbonButton();
C1Ribbon1.Qat.MenuItems.Add(NewFileRibbonBtn);
c1Ribbon1.Qat.MenuItems.Add(OpenFileRibbonBtn);
// set some properties for the hot list items
NewFileRibbonBtn.SmallImage = Properties.Resources.NewBtn;
NewFileRibbonBtn.Text = "&New";
OpenFileRibbonBtn.SmallImage = Properties.Resources.OpenBtn;
OpenFileRibbonBtn.Text = "&Open";
}
|
|
