Forum > General

Assigning text to ComboBox don't fires "ComboBox1Change"

(1/1)

bonmario:
Hi, i have in a project a ComboBox:


--- Code: ---procedure TForm1.FormCreate(Sender:TObject);
begin
  ComboBox1.Items.Add('aaa');
  ComboBox1.Items.Add('bbb');
end;

--- End code ---

When i change the "Text" of the comboBox with this code, the "ComboBox1Change" is non executed.

--- Code: ---ComboBox1.Text:='bbb';
--- End code ---

It's a bug?

Thanks, MArio

Leledumbo:
Should it? AFAIK it's triggered when ItemIndex is changed.

bonmario:
I don't know if it's a bug or not, but i've tried now and also changing ItemIndex "Change" is not fired.

Marc:
There is a difference between code changes and user changes. IIRC the events should ony fire if the user changed something.

bonmario:
Ok. Thanks, Mario

Navigation

[0] Message Index

Go to full version