FileListBox & FilterComboBox

Setting the ItemIndex won't trigger the OnChange. You will have to do:

type
  TMyFilterComboBox = class(TFilterComboBox);

procedure TForm1.FilterComboBox1Change(Sender: TObject);
begin
  FilterComboBox2.ItemIndex := FilterComboBox1.ItemIndex;
  TMyFilterComboBox(TFilterComboBox2).Change;
end;

"D" <n...@email.com> schreef in bericht
news:7gju44ls40iaicda9cdlbavkcmosucdmd7rf@abc.com...

Quote
> Hi All,

> I have 2 sets of FileListBox & FilterComboBoxes.

> FileListBox1          FileListBox2
> FilterComboBox1  FilterComboBox2

> When changing FilterComboBox1 i want FilterComboBox2 to change to the
> same selection (which i can do) AND i want FileListBox2 to
> update/refresh using the new mask of FilterComboBox2.

> The code i'm using is .....

> procedure TForm1.FilterComboBox1Change(Sender: TObject);
> begin
>   FilterComboBox2.ItemIndex := FilterComboBox1.ItemIndex;
> end;

> I've tried ..
> procedure TForm1.FilterComboBox2Change(Sender: TObject);
> begin
>   FileListBox2.Update;
> end;

> Have also tried FileListBox2.Refresh; but no go.

> The problem is even tho FilterComboBox2 changes to the new mask
> FileListBox2 doesn't recognize the change. If i click on
> FilterComboBox2 once the mask takes effect.

> What am i doing wrong here?

> Thanks,
> D

> ps. i'm still compiling info on the previous discussion on ifthen,
> loops, etc...