Walkthrough: Arranging Controls on Windows Forms Using Snaplines
https://msdn.microsoft.com/en-us/library/t5b5kc41(v=vs.110).aspx
Spacing and Aligning Controls Using Snaplines
Snaplines give you an accurate and intuitive way to align controls on your form.
They appear when you are moving a selected control or controls near a position that would align with another control or set of controls.
Your selection will "snap" to the suggested position as you move it past the other controls.
To arrange controls using snaplines
1.Drag a Button control from the Toolbox onto your form.
2.Move the Button control to the lower-right corner of the form. Note the snaplines that appear as the Button control approaches the bottom and right borders of the form. These snaplines display the recommended distance between the borders of the control and the form.
3.Move the Button control around the borders of the form and note where the snaplines appear. When you are finished, move the Button control near the center of the form.
snapline在你拖动到form边界的时候,会出现。
Aligning to Form and Container Margins
Snaplines help you to align your controls to form and container margins in a consistent manner.
To align controls to form and container margins
1.Change the value of the Button control's Margin property by expanding the Margin entry in the Properties window and setting the Allproperty to 0.
For details, see Walkthrough: Laying Out Windows Forms Controls with Padding, Margins, and the AutoSize Property.
2.Move the Button control close to the right border of the form until a snapline appears. This distance is now given by the value of the form's Padding property.
3.Drag a GroupBox control from the Toolbox onto your form.
4.Change the value of the GroupBox control's Padding property by expanding the Padding entry in the Properties window and setting the Allproperty to 10.
5.Drag a Button control from the Toolbox into the GroupBox control.
6.Move the Button control close to the right border of the GroupBox control until a snapline appears. Move the Button control within theGroupBox control and note where the snaplines appear.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2015-10-18 git源码中的Makefile
2015-10-18 git clone 出错SSL certificate problem, verify that the CA cert is OK.
2015-10-18 linux切换用户
2015-10-18 linux系统中删除文件夹
2015-10-18 linux根目录下的文件夹
2015-10-18 CentOS升级git
2015-10-18 CentOS5.5上安装git