Spread提供ContextMenu属性,你可以将自定义的ContextMenu设置给Spread,比如:
- ContextMenu custommenu = new ContextMenu();
- custommenu.MenuItems.Add("&Table");
- custommenu.MenuItems.Add("&Color", new EventHandler(ContextMenu_Color));
- fpSpread1.ContextMenu = custommenu;
- private void ContextMenu_Color(object sender, System.EventArgs e)
- {
- MessageBox.Show("You chose color.");
- }
复制代码 |