Prevent control from being added to QuickAccessToolbar

Hello

Is there a way to prevent an control on the ribbon from being added to the QuickAccessToolbar? We currently have a combo box on the Ribbon and if a user addes that control to the QuickAccessToolbar it does not stay in sync with the source combo box.

Thanks
Patrick


1 Reply

FS Fathima Shalini P Syncfusion Team September 17, 2008 07:28 AM UTC

Hi Patrick,

Thank you for your interest in Syncfusion Products .

It is possible to prevent a ToolStripItem to be added to the QuickAccessToolBar using the QuickItems_BeforeAddItem event. Please refer to the following code snippets and the sample that illustrates this:


void QuickItems_BeforeAddItem(object obj, RibbonItemEventArgs args)
{

if (args.Item.Text == this.toolStripEx1.Items[2].Text)
{
args.Cancel = true;
}

}



http://websamples.syncfusion.com/samples/Tools.Windows/PreventAddingQUickItems/main.htm

Please let me know if any concerns.

Regards,
Fathima


Loader.
Up arrow icon