通过代码将ToolStrioButton转换为ToolStripDropDown按钮 [英] Convert ToolStrioButton to ToolStripDropDown button through code
本文介绍了通过代码将ToolStrioButton转换为ToolStripDropDown按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以通过设计师将ToolStipButton转换为ToolStripDropDown按钮,请建议如何通过设计器转换它代码。
R.Senthil
解决方案
我担心你需要删除旧项目然后插入一个新项目:
toolStrip1.Items.Remove( toolStripButton1);
ToolStripDropDownButton toolStripDropDown = new ToolStripDropDownButton();
toolStrip1.Items.Insert(0,toolStripDropDown);问候,
Stanly
Hi,
I am able to convert the ToolStipButton to ToolStripDropDown button through designer, please advice how to convert it through code.
R.Senthil
解决方案
Hi,
I'm afraid you need to remove the old item then insert a new one:
toolStrip1.Items.Remove(toolStripButton1); ToolStripDropDownButton toolStripDropDown = new ToolStripDropDownButton(); toolStrip1.Items.Insert(0, toolStripDropDown);Regards,
Stanly
这篇关于通过代码将ToolStrioButton转换为ToolStripDropDown按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文