在c#中设置运行时的TextBoxs位置 [英] set TextBoxs position on runtime in c#

查看:174
本文介绍了在c#中设置运行时的TextBoxs位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


i希望在运行时在c#中移动我的TextBoxs并且这个我没有问题,但我想当我移动一个TextBox时它向我显示一个用于设置另一个TextBox和表格的行(只是用TextBoxes设置)不是其他控件)如设计师中的C#,当你移动一个控件时它会显示一条线,你可以用另一个控件和表单设置它

With Respect

Hi i want to move my TextBoxs on runtime in c# and with this i have no problem but i want when i moving a TextBox it show me a line for set with another TextBoxs and the form (just set with TextBoxes not other controls) like C# in designer when you move a control it show you a line and you can set it with another controls and form
With Respect

推荐答案

我认为一种方法是保留其他控件/文本框的列表,每次拖动其他TextBox时都会跟踪X和Y坐标。在设计表单的下方的图层上放置一个面板或其他自定义控件。如果X Y坐标对齐,每次重新绘制面板上的引导线。
One way I thought would be to keep a list of other controls/textboxes and each time you drag the other TextBox keep track of there X and Y coordinates. Have a panel or other custom control on layer below where the form is being designed. Each time re-draw the 'guide' lines on the panel if the X Y coordinates line up.


这篇关于在c#中设置运行时的TextBoxs位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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