通过代码将ToolStrioButton转换为ToolStripDropDown按钮

编程入门 行业动态 更新时间:2024-10-28 14:23:20
本文介绍了通过代码将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按钮

本文发布于:2023-11-08 11:54:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569299.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   按钮   代码   ToolStrioButton   ToolStripDropDown

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!