Articles in this section

How to add or remove QAT item through code in WinForms RibbonControlAdv?

Add or remove QAT item

To add ToolStripItems to the QAT, RibbonControlAdv.Header.AddQuickItem method can be used.

C#

ToolStripButton toolStripButton = new ToolStripButton();
toolStripButton.Text = this.comboBox1.Text;
this.ribbonControlAdv1.Header.AddQuickItem(toolStripButton);

VB

Dim toolStripButton As ToolStripButton = New ToolStripButton()
toolStripButton.Text = Me.comboBox1.Text
Me.ribbonControlAdv1.Header.AddQuickItem(toolStripButton)

To remove ToolStripItems from the QAT, RibbonControlAdv.Header.QuickItems.RemoveAt method can be used. The index of the item to be removed should be passed to this method.

C#

this.ribbonControlAdv1.Header.QuickItems.RemoveAt(1);

VB

Me.ribbonControlAdv1.Header.QuickItems.RemoveAt(count)

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied