如何以编程方式转换ToolStripItems? [英] How to programmatically convert ToolStripItems?

查看:60
本文介绍了如何以编程方式转换ToolStripItems?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio设计器可以选择右键单击ToolStripItem(例如T oolStripButton),选择转换为,然后将其转换为其他类型的ToolStripItem(对于例如ToolStripLabel).
是否可以在运行时以编程方式实现这一目标?
谢谢.
Toli

The Visual Studio designer has an option to right click on a ToolStripItem (for example a ToolStripButton), choose Convert To and convert it to other type of ToolStripItem (for example a ToolStripLabel).
Is it possible to achieve this programmatically, at runtime?
Thank you.
Toli

推荐答案

这仅是设计时功能,您无法在运行时进行更改.您需要在运行时用ToolStripLabel替换ToolStripItem才能获得类似的功能.
This is a design time feature only, you can''t change it at runtime. You would need to replace the ToolStripItem with a ToolStripLabel at runtime to get similar functionality.


这篇关于如何以编程方式转换ToolStripItems?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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