在表单上添加可移动文本框 [英] Add movable textbox on form

查看:85
本文介绍了在表单上添加可移动文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要在母版页上添加可移动的文本框,这是可移动的,意味着用户可以更改其位置或将其移动到窗体上的任何位置。 />


请建议我使用哪种控件以及如何实现。





提前感谢您的指导。

Hi,

I need to add movable textbox on my master page, which is movable means user can change its position or move it anywhere on form.

Please suggest me way which control i need to use and how it achieved.


Thanks in advance for your guidance.

推荐答案

您可以将dIV与javascript一起使用。如果您将文本框放在DIV中,则可以拖动它。拖动的东西见下面



使用Movable DIV JavaScript [ ^ ]



jQuery Draggable [ ^ ]
You may use DIV with javascript. If you put the textbox inside the DIV then you can drag that. For dragging things see below

Movable DIV using JavaScript [^]

jQuery Draggable[^]


你需要设置动态文本框的位置用户输入值X& Y.



使用 MouseMove 事件并放置吹线



You need to set the position of the textbox dynamic in which the user enter the values the X & Y.

use the MouseMove event and put the blow line

textBox1.Location = new Point(e.X, e.Y);


尝试使用 DragPanel [ ^ ]


这篇关于在表单上添加可移动文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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