1.概述
- 将 AutoLabel 与任何其他控件配对,配对后,AutoLabel 会随着标记控件的位置变化而自动重新定位
2.入门
- 添加控件 AutoLabel ,TextBoxExt。
- AutoLabel 选择LabeledControl属性,选择新添加的 TextBoxExt控件
3.属性和方法
属性 | 描述 | 设计器添加 | 代码添加 |
---|---|---|---|
DX | AutoLabel 左侧与其标签控件之间的有效水平距离 | ![]() | this.autoLabel1.DX = -70; |
DY | AutoLabel 顶部与其标签控件之间的有效垂直距离 | ![]() | this.autoLabel1.DY = 3; |
Gap | 指定计算相对位置时要使用的水平和垂直间隙(与绑定控件之间的距离) | ![]() | this.autoLabel1.Gap = 10; |
Position | 控件和 AutoLabel 的相对位置(通过修改DX和DY移动位置) | ![]() | this.autoLabel1.Position = Syncfusion.Windows.Forms.Tools.AutoLabelPosition.Side; |
AutoSize | 是否自动调整AutoLabel 控件的大小 | ![]() | this.autoLabel1.AutoSize = true; |