how to add icon to context menu in c# windows form application

懵懂的女人 提交于 2019-12-01 13:26:25

问题


I am having a tree view in which if i right click any node context menu is displayed,Now i want to add icons corresponding to items in the context menu.


回答1:


If you're talking about ContextMenuStrip control, you can do that either it in the designer, by clicking on the item and selecting "Set image...", or programmatically by changing the Image property of the ToolStripMenuItem.



来源:https://stackoverflow.com/questions/6555691/how-to-add-icon-to-context-menu-in-c-sharp-windows-form-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!