delphi 动态创建 复选框控件
2012-05-31 09:37
369 查看
procedure TFrmSysIni.FormCreate(Sender: TObject);
var
I:Integer;
Col,Row:Integer;//第几列
begin
TabelList:=TStringList.Create;
DM1.ADOC1.GetTableNames(TabelList);
Col:=0; Row:=0;
For I:=0 to TabelList.Count-1 do
begin
if Col>13 then
begin
Col:=0;
Row:=Row +1 ;
end;
CheckList:=TRzCheckBox.Create(Self);
with CheckList do
begin
Parent:=RzPanel1;
Width:=140;
Height:=20;
Left:=16 +(Row*140);
Top:=16 + (Col*24);
Name:= 'CheckList'+inttostr(I);
Caption:= TabelList.Strings[I];
Visible:=true;
if TabelList.Strings[I]='COM_DB' then Enabled:=False;
if TabelList.Strings[I]='COM_PARA' then Enabled:=False;
if TabelList.Strings[I]='TIME_SORT' then Enabled:=False;
if TabelList.Strings[I]='TIME_RULE' then Enabled:=False;
if TabelList.Strings[I]='COM_CODE' then
begin
//Enabled:=False;
Color:=clRed;
// OnClick:=CheckListOnClick;
end;
if TabelList.Strings[I]='CHARGE_STATION' then Enabled:=False;
Transparent:=True;
end;
Col:=Col +1;
end;
end;
var
I:Integer;
Col,Row:Integer;//第几列
begin
TabelList:=TStringList.Create;
DM1.ADOC1.GetTableNames(TabelList);
Col:=0; Row:=0;
For I:=0 to TabelList.Count-1 do
begin
if Col>13 then
begin
Col:=0;
Row:=Row +1 ;
end;
CheckList:=TRzCheckBox.Create(Self);
with CheckList do
begin
Parent:=RzPanel1;
Width:=140;
Height:=20;
Left:=16 +(Row*140);
Top:=16 + (Col*24);
Name:= 'CheckList'+inttostr(I);
Caption:= TabelList.Strings[I];
Visible:=true;
if TabelList.Strings[I]='COM_DB' then Enabled:=False;
if TabelList.Strings[I]='COM_PARA' then Enabled:=False;
if TabelList.Strings[I]='TIME_SORT' then Enabled:=False;
if TabelList.Strings[I]='TIME_RULE' then Enabled:=False;
if TabelList.Strings[I]='COM_CODE' then
begin
//Enabled:=False;
Color:=clRed;
// OnClick:=CheckListOnClick;
end;
if TabelList.Strings[I]='CHARGE_STATION' then Enabled:=False;
Transparent:=True;
end;
Col:=Col +1;
end;
end;
相关文章推荐
- Delphi 动态创建控件,是否时报越界错误
- Delphi中控件的动态创建
- Delphi控件cxGrid 如何动态创建列?
- 在delphi中动态创建控件
- Delphi10.1下FormCreate中动态创建的控件在移动端显示不对的解决办法
- delphi动态创建的TMSComm串口控件不起作用!
- DELPHI 动态 创建和释放 多个 EDIT 控件
- Delphi 代码创建控件与事件动态绑定
- DELPHI 动态 创建和释放 多个 EDIT 控件
- Delphi动态创建控件
- DELPHI 动态 创建和释放 多个 EDIT 控件
- 在MFC中动态创建控件以及事件响应(静态控件)
- 动态创建控件 举例
- Javascript动态创建复选框
- 动态创建控件
- 3.2.2 工具栏上动态创建控件combobox
- 基于ASP.NET的Web动态控件创建
- 动态创建控件
- 动态创建 ASP.NET Web 服务器控件模板(出自MSDN)
- Delphi动态创建组件,并释放内存