当前位置: 首页 > news >正文

控件基本属性Padding, Margins, Align...

一幅图说明Padding, Margins的用法。

 

scale:缩放控件,不会影响到控件的size属性,1为不缩放, 充许负值。 缩放原点,2D的为控件原点,即左上角。3D的为控件中心。

rotation:旋转控件,2D的旋转支点是可调整的,rotation center 默认为(0.5,0.5).控件的左上角为(0,0),右下角为(1,1).RotationAngle是旋转角度,顺时针方向。

3D情况下,支点永远为控件中心。循右手法则。

一个控件的缩放发生在旋转前,这是因为旋转支点是可调整的。

 

anchors: 指定当前控件与parent控件的边框的关联。 当parent控件resize时,当前控件保持与parent边框的相对距离保持不变。该属性只在parent->resize时产生影响。

TAlignLayout can have one of the following values:

ValueMeaning

Bottom

The control moves and pins to the bottom of its parent and resizes to fill the width of its parent. The height of the control is not affected. If another most side-pinned control already occupies part of the parent area, the control resizes to fill the remaining width of its parent. The anchors are set to [akLeft,akBottom,akRight].

Center

The control moves to the center of the parent area. The control's size is not affected. If another side-pinned control already occupies part of the parent area, the control moves to the center of the remaining parent area. The control is not anchored to its parent.

到client区域的中心位置。不设瞄点。

一般占用客户区域的情况,如果已有其它停靠了边框的控件,则会自动调整计算剩下的区域。后面不再说明这种情况。

Client

The control resizes to fill the client area of its parent. If another side-pinned control already occupies part of the parent area, the control resizes to fit within the remaining parent area. The anchors are set to [akLeft,akTop,akRight,akBottom].

Contents

The control resizes to fill the entire bounds of its parent, overlapping it.
The anchors are set to [akLeft,akTop,akRight,akBottom]

占用parent整个区域,非client区,瞄点上下左右。

Fit

The control resizes to fit the parent area, preserving its aspect ratio. The control moves to the center of the parent area. The anchors are set to [akLeft,akTop,akRight,akBottom].

调整控件大小,保持纵横比,到parent的区域,居中显示,并设置了4个瞄点。

FitLeft

The control resizes to fit the parent area, preserving its aspect ratio. The control moves to and pins to the left side of the parent. The anchors are set to [akLeft,akTop,akRight,akBottom].

类同fit,但是不是居中显示,而是停靠在parent左边框。4瞄点。

FitRight

The control resizes to fit the parent area, preserving its aspect ratio. The control moves to and pins to the right side of the parent. The anchors are set to [akLeft,akTop,akRight,akBottom].

Horizontal

The control resizes to fill the height of its parent. The width of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent.
The anchors are set to [akLeft,akRight].

控件宽度占满client区域,并瞄点左右。

英文解释像是有问题,

HorzCenter

The control is centered horizontally within the client area of the parent and resizes to fill the height of its parent. The width of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent. The anchors are set to [akTop,akBottom].

调节控件高度占满parent client区哉,同时水平居中控件,设置瞄点[上,下]。 其它停靠边框的控件会挤占客户区。

Left

The control moves and pins to the left side of its parent and resizes to fill the height of its parent. The width of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent. The anchors are set to [akLeft,akTop,akBottom].

MostBottom

The control moves and pins to the bottom of its parent, set to be the bottommost, and resizes to fill the width of its parent. The height of the control is not affected. The anchors are set to [akLeft,akRight,akBottom].

基本等同bottom,区别(当有多个bottom控件时)是它会移动到最下面。

MostLeft

The control moves and pins to the left side of its parent, set to be the leftmost, and resizes to fill the height of its parent. The width of the control is not affected. If another most side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent.
The anchors are set to [akLeft,akTop,akBottom].

MostRight

The control moves and pins to the right side of its parent, set to be the rightmost, and resizes to fill the height of its parent. The width of the control is not affected. If another most side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent. The anchors are set to [akTop,akRight,akBottom].

MostTop

The control moves and pins to the top of its parent, set to be the topmost, and resizes to fill the width of its parent. The height of the control is not affected. The anchors are set to [akLeft,akTop,akRight].

None

The control remains where it was placed. This is the default value. No automatic positioning and sizing are performed. The anchors are set to [akLeft,akTop].

Right

The control moves and pins to the right side of its parent and resizes to fill the height of its parent. The width of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent. The anchors are set to [akRight,akTop,akBottom].

Scale

The control resizes and moves to maintain the relative position and size as its container resizes. The anchors are set to [akLeft,akTop,akRight,akBottom].

设置4瞄点,当parent resize时,本控件比例缩放。 

Top

The control moves and pins to the top of its parent and resizes to fill the width of its parent. The height of the control is not affected. If another most side-pinned control already occupies part of the parent area, the control resizes to fill the remaining width of its parent. The anchors are set to [akLeft,akTop,akRight].

VertCenter

The control is centered vertically within the client area of the parent and resizes to fill the width of its parent. The height of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining width of its parent. The anchors are set to [akLeft,akRight].

垂直居中。左右瞄点。占整个客户区。

Vertical

The control resizes to fill the width of its parent. The height of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining width of its parent.
The anchors are set to [akTop,akRight].

调整高度,占整个客户区,上下瞄点。

转载于:https://www.cnblogs.com/khzide/p/4430314.html

相关文章:

  • IBM Tivoli Management Framework默认设置漏洞
  • 在 Java SE 6 中监视和诊断性能问题
  • WinCE6.0流驱动开发的两种方法及驱动加载失败问题解决
  • android 深入研究ratingbar自定义
  • 新的Windows Azure SDK for PHP 3.0版本现已推出
  • 2764: [JLOI2011]基因补全
  • struts1.2实现图片上传
  • 进程管理工具glances的使用
  • Acunetix Web Vulnerability Scanner
  • “无价”的美妙——阅《无价》有感
  • fedora21安装ruby-rails
  • [实战运维小技巧]-解决perl命令执行或编译问题
  • Attractive Music Store OpenCart 自适应主题模板 ABC-0237
  • Bitcoin虚拟货币原理
  • 典型用户及用户场景分析
  • python3.6+scrapy+mysql 爬虫实战
  • 【跃迁之路】【669天】程序员高效学习方法论探索系列(实验阶段426-2018.12.13)...
  • Essential Studio for ASP.NET Web Forms 2017 v2,新增自定义树形网格工具栏
  • golang 发送GET和POST示例
  • Java 最常见的 200+ 面试题:面试必备
  • JavaScript学习总结——原型
  • Joomla 2.x, 3.x useful code cheatsheet
  • Logstash 参考指南(目录)
  • MySQL数据库运维之数据恢复
  • v-if和v-for连用出现的问题
  • Windows Containers 大冒险: 容器网络
  • 工作手记之html2canvas使用概述
  • 跨域
  • 如何邀请好友注册您的网站(模拟百度网盘)
  • 运行时添加log4j2的appender
  • 自动记录MySQL慢查询快照脚本
  • C# - 为值类型重定义相等性
  • 函数计算新功能-----支持C#函数
  • # 数论-逆元
  • #、%和$符号在OGNL表达式中经常出现
  • #Linux杂记--将Python3的源码编译为.so文件方法与Linux环境下的交叉编译方法
  • ( )的作用是将计算机中的信息传送给用户,计算机应用基础 吉大15春学期《计算机应用基础》在线作业二及答案...
  • (DFS + 剪枝)【洛谷P1731】 [NOI1999] 生日蛋糕
  • (html5)在移动端input输入搜索项后 输入法下面为什么不想百度那样出现前往? 而我的出现的是换行...
  • (九)c52学习之旅-定时器
  • (算法设计与分析)第一章算法概述-习题
  • (原創) 如何解决make kernel时『clock skew detected』的warning? (OS) (Linux)
  • (转)mysql使用Navicat 导出和导入数据库
  • .NET 4.0中的泛型协变和反变
  • .NET 分布式技术比较
  • .NET 使用 XPath 来读写 XML 文件
  • .NET/C# 利用 Walterlv.WeakEvents 高性能地定义和使用弱事件
  • .Net8 Blazor 尝鲜
  • .NET单元测试
  • .net解析传过来的xml_DOM4J解析XML文件
  • .NET中 MVC 工厂模式浅析
  • @media screen 针对不同移动设备
  • [ C++ ] template 模板进阶 (特化,分离编译)
  • [].shift.call( arguments ) 和 [].slice.call( arguments )
  • []我的函数库