使ToolStrip中的按钮可拖动 [英] Make buttons in ToolStrip dragable

查看:115
本文介绍了使ToolStrip中的按钮可拖动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个ToolStrip,并且想要制作它,以便用户可以拖放按钮来重新排列它们.我尝试将AllowItemReorder设置为true,但这需要用户按住Alt键.我希望不是这种情况.但是,除了完全从头开始并使用MouseDown和MouseUp事件处理程序编写自己的例程以进行拖放之外,我似乎找不到任何方法.

I have created a ToolStrip and want to make it so the user can drag and drop buttons to rearrange them. I have tried setting the AllowItemReorder to true, but this requires the user to hold down the Alt key. I would prefer that this wasn''t the case. But other than completely starting from scratch and programming my own routines to drag and drop using the MouseDown and MouseUp event handlers I cannot seem to find a way to do this.

推荐答案

这显然应该可行,但我从未见过任何实现它的代码.

如果找不到合适的东西,可以使ToolStrip可自定义",如所示 ^ ].
This obviously should be possible but I have never seen any code that implements it.

In case you are unable to find anything suitable, you can make the ToolStrip ''Customizable'' as demonstrated here[^].


这篇关于使ToolStrip中的按钮可拖动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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