using ;
using ;
using ;
using ;
private void spreadsheetControl1_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
if ( == )
{
// Remove the "Clear Contents" menu item.
();
// Disable the "Hyperlink" menu item.
();
// Create a menu item for the Spreadsheet command, which inserts a picture into a worksheet.
ISpreadsheetCommandFactoryService service = (ISpreadsheetCommandFactoryService)(typeof(ISpreadsheetCommandFactoryService));
SpreadsheetCommand cmd = ();
SpreadsheetMenuItemCommandWinAdapter menuItemCommandAdapter = new SpreadsheetMenuItemCommandWinAdapter(cmd);
SpreadsheetMenuItem menuItem = (SpreadsheetMenuItem)();
= true;
(menuItem);
// Insert a new item into the Spreadsheet popup menu and handle its click event.
SpreadsheetMenuItem myItem = new SpreadsheetMenuItem("My Menu Item", new EventHandler(MyClickHandler));
(myItem);
}
}
public void MyClickHandler(object sender, EventArgs e)
{
("My Menu Item Clicked!");
}