Problem TsComboBox & TsComboBoxEx Click

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37257
    Gregory.P
    Participant

    Problem TsComboBox & TsComboBoxEx Click :cs:

    [attachment=8061:ezgif.com-video-to-gif.gif]

    Code:
    procedure TForm1.sComboBox1Click(Sender: TObject);
    begin
    sComboBox1.Clear;

    with sComboBox1.Items do
    begin
    Add('1');
    Add('2');
    Add('3');
    end;

    sComboBox1.ItemIndex := 0;
    end;

    procedure TForm1.sComboBox2DblClick(Sender: TObject);
    begin
    sComboBox2.Clear;

    with sComboBox2.Items do
    begin
    Add('1');
    Add('2');
    Add('3');
    end;

    sComboBox2.ItemIndex := 0;
    end;

    [attachment=8062:Code.zip]

    thank you 😀

    #55957
    Support
    Keymaster

    Thank you for the demo. This is a standard behaviour, OnClick event is not fired in standard TCombobox too.

    #55958
    Gregory.P
    Participant
    'Support' wrote:

    Thank you for the demo. This is a standard behaviour, OnClick event is not fired in standard TCombobox too.

    Ok DropDown event = OnClick event :a3:

    Code:
    procedure TForm1.sComboBox1DropDown(Sender: TObject);
    begin

    sComboBox1.Clear;

    with sComboBox1.Items do
    begin
    Add('1');
    Add('2');
    Add('3');
    end;

    sComboBox1.ItemIndex := 0;
    end;

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.