动态创建CheckBox问题

fantasyboy 2003-03-21 11:04:42
请问怎样动态创建CheckBox,并怎样控制?
谢谢!
...全文
32 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuanfy 2003-03-21
  • 打赏
  • 举报
回复
ChBx:= TCheckBox.create(self);
chbx.top:=100;
chbx.left:=100;
chbx.parent:= self;
即可
chinesetree 2003-03-21
  • 打赏
  • 举报
回复
buttonColor 不要用了
我自己的
chinesetree 2003-03-21
  • 打赏
  • 举报
回复
使用时可以做成控件
也可以引用单元:
use ...,mycombobox,...
onenter,onchange为event
在事件中:
with TMyComboBox.Create(self) do
begin
name := 'MyCom';
top := 50;
left := 50;
ButtonColor := clskyblue;
onEnter := MyClick;
OnChange := MyChange;
Text := '请选择';
parent := self;
end;
yzykjh 2003-03-21
  • 打赏
  • 举报
回复
var fcheckbox: TCheckBox;
begin
fcheckbox:=TCheckBox.Create(Self);
fcheckbox.parent:=Form1;
end;
smilelhh 2003-03-21
  • 打赏
  • 举报
回复
ChBx:= TCheckBox.create(self);
chbx.top:=
chbx.left:=
chbx.width:=
chbx.height:=
chbx.parent:= self;
cbhx.show;

5,939

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧