TsDBLookupComboBox has changed

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #56348
    Support
    Keymaster

    Hello

    I think, you should use standard ways for this, I mean the DataSource.OnChange event or your DBField.OnChange event.

    #56409
    Ronaldo Souza
    Participant
    'Support' wrote:

    Hello

    I think, you should use standard ways for this, I mean the DataSource.OnChange event or your DBField.OnChange event.

    This event fires way too many times in my case, even before the fields get fully defined, so I ended up with a rather simple solution:

    Code:
    //VERY simplified pseudo-code
    procedure TForm1.sDBLookupComboBoxOnClick(Sender: TObject);
    begin
    if (Table1Item.AsString fLastItem)
    then begin
    fLastItem := Table1Item.AsString; //save for next check
    ShowMessage('ITEMS ARE DIFFERENT!')
    end;
    end;

    Best regards,

    Ronaldo

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