object grdpnlAdd: TGridPanel
Left =
Top =
Width =
Height =
Align = alClient //重要
BevelOuter = bvNone
BorderWidth =
Color = clWhite
ColumnCollection = < //设定3列 设定比例
item
Value = 49.500000000000000000
end
item
Value = 1.000000000000000000
end
item
Value = 49.500000000000000000
end>
ControlCollection = <
item
Column =
Control = pnlVehicleInfo //每个格子控制的容器
Row =
end
item
Column =
Control = pnlTransportInfo
Row =
end
item
Column =
Control = pnlCarrageUnit
Row =
end
item
Column =
Control = pnlConsignUnit
Row =
end
item
Column =
Control = pnl1CargoInfo
Row =
end
item
Column =
Control = pnl1Hint
Row =
end>
DoubleBuffered = True
ExpandStyle = emFixedSize
Locked = True
Padding.Left =
Padding.Top =
Padding.Right =
Padding.Bottom =
ParentBackground = False
ParentDoubleBuffered = False
RowCollection = < //添加五行,设定比例
item
Value = 33.000000000000000000
end
item
Value = 1.000000000000000000
end
item
Value = 27.000000000000000000
end
item
Value = 1.000000000000000000
end
item
Value = 38.000000000000000000
end>
TabOrder =
VerticalAlignment = taAlignBottom
ExplicitTop = -
ExplicitWidth =
ExplicitHeight =
object pnlVehicleInfo: TPanel
Left =
Top =
Width =
Height =
Align = alClient
BevelOuter = bvNone
BevelWidth =
BorderWidth =
Color =
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentBackground = False
ParentFont = False
TabOrder =
ExplicitWidth =
ExplicitHeight =
object grpVehicleInfo: TGroupBox
Left =
Top =
Width =
Height =
Align = alClient
Caption = ' '####' '
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentFont = False
TabOrder =
ExplicitWidth =
ExplicitHeight =
end
end
object pnlTransportInfo: TPanel
Left =
Top =
Width =
Height =
Align = alClient
BevelOuter = bvNone
BevelWidth =
BorderWidth =
Color =
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentBackground = False
ParentFont = False
TabOrder =
ExplicitTop =
ExplicitWidth =
ExplicitHeight =
object grpTransportInfo: TGroupBox
Left =
Top =
Width =
Height =
Align = alClient
Caption = ' '####' '
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentFont = False
TabOrder =
ExplicitWidth =
ExplicitHeight =
end
end
object pnlCarrageUnit: TPanel
Left =
Top =
Width =
Height =
Align = alClient
BevelOuter = bvNone
BevelWidth =
BorderWidth =
Color =
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentBackground = False
ParentFont = False
TabOrder =
ExplicitLeft =
ExplicitWidth =
ExplicitHeight =
object grpCarrageUnit: TGroupBox
Left =
Top =
Width =
Height =
Align = alClient
Caption = ####' '
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentFont = False
TabOrder =
ExplicitWidth =
ExplicitHeight =
end
end
object pnlConsignUnit: TPanel
Left =
Top =
Width =
Height =
Align = alClient
BevelOuter = bvNone
BevelWidth =
BorderWidth =
Color =
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentBackground = False
ParentFont = False
TabOrder =
ExplicitLeft =
ExplicitTop =
ExplicitWidth =
ExplicitHeight =
object grpConsignUnit: TGroupBox
Left =
Top =
Width =
Height =
Align = alClient
Caption = ' '####' '
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentFont = False
TabOrder =
ExplicitWidth =
ExplicitHeight =
end
end
object pnl1CargoInfo: TPanel
Left =
Top =
Width =
Height =
Align = alClient
BevelOuter = bvNone
BevelWidth =
BorderWidth =
Color =
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentBackground = False
ParentFont = False
TabOrder =
ExplicitTop =
ExplicitWidth =
ExplicitHeight =
object grpCargoInfo: TGroupBox
Left =
Top =
Width =
Height =
Align = alClient
Caption = ' '####' '
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentFont = False
TabOrder =
ExplicitWidth =
ExplicitHeight =
end
end
object pnl1Hint: TPanel
AlignWithMargins = True
Left =
Top =
Width =
Height =
Align = alClient
BevelOuter = bvNone
BevelWidth =
BorderWidth =
Color =
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = ####
Font.Style = []
ParentBackground = False
ParentFont = False
TabOrder =
ExplicitLeft =
ExplicitTop =
ExplicitWidth =
ExplicitHeight =
end
end

全选复制,粘贴到XE 的空窗体上即可。

添加行 控件的ColumnCollection属性右键添加 Add item

添加列 控件的RowCollection 属性右键添加 Add item

控制的格子ControlCollection 就自动出来了,在上面放panel等容器,然后通过这个属性选择容器对应受到哪个格子控制。

或者用代码控制

{grdpnlAdd.ColumnCollection.BeginUpdate;
grdpnlAdd.ColumnCollection[0].Value := 49.5;
grdpnlAdd.ColumnCollection[1].Value := 1;
grdpnlAdd.ColumnCollection[2].Value := 49.5;
grdpnlAdd.ColumnCollection.EndUpdate;
grdpnlAdd.RowCollection.BeginUpdate;
grdpnlAdd.RowCollection[0].Value := 32;
grdpnlAdd.RowCollection[1].Value := 1;
grdpnlAdd.RowCollection[2].Value := 32;
grdpnlAdd.RowCollection[3].Value := 1;
grdpnlAdd.RowCollection[4].Value := 33;
grdpnlAdd.RowCollection.EndUpdate; }

TGridPanel做一个自动按比例缩放的窗体的更多相关文章

  1. 做一个自动修改本机IP和mac的bat文件

    原文:做一个自动修改本机IP和mac的bat文件 1.ip bat修改理论探讨 前两天我突然萌生了一个念头:能不能做一个小程序来实现自动配置或修改IP和mac,达到一键搞定的目的,这样尤其适合那些带着 ...

  2. Micropython 如何用Turnipbit做一个自动浇水装置

    最近在研究Turnipbit这块板子,打算是连接一个摄像头模块,正在实验练习中,(祝自己早日弄好)上篇文章我们讲了用Turnipbit连接LCD5110显示英文词句,前几天给家里花浇水的时候发现花招了 ...

  3. [转]用Python做一个自动生成读表代码的小脚本

    写在开始(本片文章不是写给小白的,至少你应该知道一些常识!) 大家在Unity开发中,肯定会把一些数据放到配置文件中,尤其是大一点的项目,每次开发一个新功能的时候,都要重复的写那些读表代码.非常烦.来 ...

  4. 【按键精灵篇】如何做一个自动打开APP进入注册页面自动输入自己手机号

    按键精灵,虽然很早听过,但是一直没有真正使用过,所以最近有点时间也简单试一下,通过脚本自动清理APP缓存,打开百家号并自动进入注册页面输入自己的手机号. 软件清单 1. 雷电手机模拟器:https:/ ...

  5. 今天做一个winform,想直接把窗体改成输出类库,其他地方直接调结果总提示不能注册组件,回来调度,可以,总结,windows还是直接用新建的类型项目,改容易出错

    如题, 对于winform程序,还是新建一个类库,这样,在类库里面可以添加窗体.这样可以提供其他程序集来调用里面的窗体

  6. 使用java AWT做一个增加按钮的简单菜单窗体

    package com.ysq.Swing; import java.awt.BorderLayout; import java.awt.Container; import java.awt.Flow ...

  7. 更新到PS CC 2019 缩放的时候 按住shift变成不规则缩放了 反而不按住shift是等比例缩放

    更新到PS CC 2019 缩放的时候 按住shift变成不规则缩放了 反而不按住shift是等比例缩放 更新到PS CC 2019 缩放的时候 按住shift变成不规则缩放了 反而不按住shift是 ...

  8. 做了一个图片等比缩放的js

    做了一个图片等比缩放的js 芋头 发布在view:8447   今天改了一下博客的主题,发现博客主题在ie6下变样了,后来发现是因为某篇文章里的某个图片太大了撑开了容器,导致样式错位,前几天公司需求里 ...

  9. delphi 一个自动控制机的硅控板检测程序,用多线程和API,没有用控件,少做改动就能用 用485开发

    一个自动控制机的硅控板检测程序,用多线程和API,没有用控件,少做改动就能用Unit CommThread; Interface Uses  Windows, Classes, SysUtils, G ...

随机推荐

  1. Linux ip

    工具/原料 linux系统 putty 方法/步骤   Linux下查看IP一般都是用命令在终端查看了,使用命令行来进行查看.   想要在图形界面查看的朋友也有办法,不过就比较复杂,不如一条命令来得痛 ...

  2. 树莓派2系统DietPi简单安装配置使用介绍

    DietPi在Raspberrypi.org上的原帖:http://dwz.cn/HSrmY 版本发布很频繁,给原作者们点个赞.功能会越来越多,而且作者的定制观点很明确,适合树莓派的使用. 之前关于D ...

  3. Path Sum

    需如下树节点求和 5  /  \ 4     8  /     /  \ 11  13    4 / \     /  \  7    2      5   1 JavaScript实现 window ...

  4. centos7 没有iptables服务 file or directory? 用secureCRT登录centos?

    cenetos7 采用systemd来管理服务 centos7 没有采用传统的iptables服务, 而是采用的firewalld 服务, 以及firewall-cmd 命令; 也可以采用传统的 ip ...

  5. UI第十二节

    - (void)viewDidLoad {    [super viewDidLoad];        UIButton *btn = [UIButton buttonWithType:UIButt ...

  6. idea导入maven项目,web browser远程单步调试

    问题:之前用idea14.1.3导入maven项目后,maven的dependencies不能自动解决依赖,到处都是红色的红线,看着就受不了.虽然不影响命令行编译,但是看着实在是不爽.总结下面几小步: ...

  7. C++中使用初始化列表的情况

    http://blog.csdn.net/iceshirley/article/details/5688696 要理解这个问题,从概念上,我们要知道一点,那就是构造函数的执行过程会分成两个阶段:隐式或 ...

  8. python3 黑板客爬虫闯关游戏(二)

    第二关猜登录密码,需要用到urllib.request和urllib.parse 也很简单,给代码 import urllib.request as ur import urllib.parse as ...

  9. js自动更新时间+星期

    <div class="top_bar" id="cao" height="28px"><script> setIn ...

  10. 35.两链表的第一个公共结点[Find the first common node of two linked list]

    [题目] 两个单向链表,找出它们的第一个公共结点. 链表的结点定义为:  C++ Code  123456   struct ListNode {     int         m_nKey;    ...