请问怎样动态创建CheckBox,并怎样控制?
谢谢!

解决方案 »

  1.   

    ChBx:= TCheckBox.create(self);
    chbx.top:=
    chbx.left:=
    chbx.width:=
    chbx.height:=
    chbx.parent:= self;
    cbhx.show;
      

  2.   

    var fcheckbox: TCheckBox;
    begin
       fcheckbox:=TCheckBox.Create(Self);
       fcheckbox.parent:=Form1;
    end;
      

  3.   

    使用时可以做成控件
    也可以引用单元:
    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;
      

  4.   

    buttonColor 不要用了
    我自己的
      

  5.   

    ChBx:= TCheckBox.create(self);
    chbx.top:=100;
    chbx.left:=100;
    chbx.parent:= self;
    即可