B bookworm Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-17 #1 怎样写运行期间创建的Checkbox: array[1..10] of TCheckbox的OnClick Event? Event depends on the index of array.
X xWolf Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-17 #2 private: procedure CheckBox***(Sender: TObject); 设置: CheckBox.Tag := I; CheckBox.OnClick := CheckBox; procedure TForm1.CheckBox***(Sender: TObject); begin ... case TCheckBox(Sender).Tag of 1: ... 10: end; ... end;
private: procedure CheckBox***(Sender: TObject); 设置: CheckBox.Tag := I; CheckBox.OnClick := CheckBox; procedure TForm1.CheckBox***(Sender: TObject); begin ... case TCheckBox(Sender).Tag of 1: ... 10: end; ... end;
B bookworm Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-22 #3 Very effective. Many thanks.