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. hdu2929 Bigger Is Better

    题意 给出n根木棍,要你拼一个最大的数,并且这个数是m的倍数. 题解 显然越长的数越大.设\(dp[i][j]\)表示用i根木棍并且\(mod m = j\)的最大长度. 我们很容易想出dp方程,再用 ...

  2. ruby

    :for 是关键字, each是方法. for 后面的变量,是全局变量,不仅仅存在于for .. end 这个作用域之内 module中的 self.xx方法可以被直接调用 module中的普通方法, ...

  3. c# winform 动态画矩形 矩形大小可以拖动

    http://jhlong12345.blog.163.com/blog/static/1230631292015544450189/#  结合上一篇,继续 矩形大小的调整   还有小bug,思路有了 ...

  4. Google Map API V3开发(2)

    Google Map API V3开发(1) Google Map API V3开发(2) Google Map API V3开发(3) Google Map API V3开发(4) Google M ...

  5. margin双边距的问题

    margin:20px;height:20px;float:left margin:20px;height:20px;float:left

  6. 在.net中使用GAC

    转自:http://blog.log4d.com/2011/01/gac/ GAC GAC是什么?是用来干嘛的?GAC的全称叫做全局程序集缓存,通俗的理解就是存放各种.net平台下面需要使用的dll的 ...

  7. Express知识整理

    开发实例 Express开发实例(1) —— Hello,world! Express开发实例(2) —— Jade模板引擎

  8. 在GridView隐藏字段

    在GridView中隐藏一字段,方便这条记录的处理,同时隐藏一个Button实现点击这条记录时的处理 1.绑定 <asp:TemplateField>                    ...

  9. Idea 开发 web项目

    1.经历 很久没有搞 web 项目了,最近一段时间搞过很多次了,但是总是在 mac 上部署失败. 2.方法: 用idea 新建一个模板的 Spring MVC 项目,部署就可以了. 3.参考: htt ...

  10. Linux进程间通信(二):信号集函数 sigemptyset()、sigprocmask()、sigpending()、sigsuspend()

    我们已经知道,我们可以通过信号来终止进程,也可以通过信号来在进程间进行通信,程序也可以通过指定信号的关联处理函数来改变信号的默认处理方式,也可以屏蔽某些信号,使其不能传递给进程.那么我们应该如何设定我 ...