如何添加图标,右键菜单中的C#Windows窗体应用程序 [英] how to add icon to context menu in c# windows form application

查看:429
本文介绍了如何添加图标,右键菜单中的C#Windows窗体应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个树视图中,如果我右键点击任何节点上下文菜单显示,现在我想添加对应于上下文菜单项的图标。

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.

推荐答案

如果你在谈论的ContextMenuStrip 控制,你可以做,要么在设计,通过点击该项目,并选择设置图像......或编程方式更改图片的属性 ToolStripMenuItem

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.

这篇关于如何添加图标,右键菜单中的C#Windows窗体应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆