Hi to all,
i'm working on Android (s10/10+ and delphi 10.3.3) and i have some trouble with TMSFNCListBox and filter.
This happend even on windows 10 64 pro same compiler and your demo (regarding this component).
Using the example, i have add a fncedit in order to have a filter edit.
When press enterkey i apply the filter.
This is the fncedit event
procedure TForm130.TMSFNCEdit1KeyUp(Sender: TObject; var Key: Word;
var KeyChar: Char; Shift: TShiftState);
begin
if Key = 13 then
begin
TMSFNCListBox1.Filter.Clear;
With TMSFNCListBox1.Filter.Add do
begin
Condition :='*' + TMSFNCEdit1.Text + '*';
end;
TMSFNCListBox1.ApplyFilter;
if TMSFNCListBox1.Items.Count>0 then // <<----- **** here always 14
begin
end;
end;
end;
As expected the filter works, but the question is ... where is stored the filter items count?
In fact if i type a non matched value (in your example a value could be 'qq') the listbox will be empty (due the fact no one items contain 'qq' string) but TMSFNCListBox1.Items.Count return always 14 (it is non zero based??) because the list have 14 items.
How i can get the real filtered items? (the list box still have always 14 items but 0 match filter condition).
Can you expose a property like TMSFNCListBox1.Items.filtercount ? (if does not already exist)
Thank's for all
Regards
Daniele