how to add buttons to the ribbon adv


Hi,

I've been trying to add buttons to the ribbon control. I've tried adding to the tab collection, the mainpanel, auxpanel, and systempanel items collections but nothing shows up on the ribbon control. Thanks!

1 Reply

HA haneefm Syncfusion Team October 25, 2007 08:28 PM UTC

Hi Code12345,

ToolStrip button can be added to the Quick item panel using the following steps,

- Create a object of ToolStripButton class
- Add the ToolStripButton class object to the ribbon control header using AddQuickItem() method.

Below are the codes that shows this task.

ToolStripButton saveItem = new ToolStripButton(Resources.save);
this.ribbonControlAdv1.Header.AddQuickItem(saveItem);

ToolStripButton undoItem = new ToolStripButton(Resources.undo);
undoItem.Enabled = false;
this.ribbonControlAdv1.Header.AddQuickItem(undoItem);

ToolStripButton redoItem = new ToolStripButton(Resources.redo);
redoItem.Enabled = false;
this.ribbonControlAdv1.Header.AddQuickItem(redoItem);

Here is a sample for your reference,
http://websamples.syncfusion.com/samples/Tools.Windows/Forum_1/main.htm

Best regards,
Haneef

Loader.
Up arrow icon