Answer the question
In order to leave comments, you need to log in
How to write procedures to dynamically created objects in Delphi?
Имеется массив из динамически созданных КомбоБоксов. Как сделать так, чтобы при выборе определенных элементов из КомбоБокса происходило какое-либо действие (например ShowMessage)
procedure TForm1.Button2Click(Sender: TObject);
begin
k := k + 1;
Day[n]:= TComboBox.Create(Form1);
Day[n].Parent:= Form1;
Day[n].Left:=50;
Day[n].Top:=50 * k;
Day[n].Width:=50;
Day[n].Style := csDropDownList;
for I := 1 to 31 do
Day[n].Items.Add(IntToStr(I));
n := n + 1;
end;
procedure TForm1.Day[0]Change(Sender: TObject);
begin
if Day[0].Text = '29' ShowMessage('!!!');
end;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question