Recent

Author Topic: TListFilterEdit and filter  (Read 2598 times)

bonmario

  • Sr. Member
  • ****
  • Posts: 346
TListFilterEdit and filter
« on: March 21, 2019, 01:23:17 pm »
Hi,
in TListFilterEdit is there a property in which there are saved how many elements satisfy the filter?

Thanks in advance, Mario

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: TListFilterEdit and filter
« Reply #1 on: March 21, 2019, 04:56:18 pm »
in TListFilterEdit is there a property in which there are saved how many elements satisfy the filter?
No but it could be added easily. If you do it and provide a patch, please implement it in the base class so that it works in all the filteredit controls.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: TListFilterEdit and filter
« Reply #2 on: March 21, 2019, 05:30:43 pm »
Is not this datum obtained simply by reading the .FilteredListBox.Count subproperty?

bonmario

  • Sr. Member
  • ****
  • Posts: 346
Re: TListFilterEdit and filter
« Reply #3 on: March 21, 2019, 06:25:19 pm »
Is not this datum obtained simply by reading the .FilteredListBox.Count subproperty?

No

No but it could be added easily. If you do it and provide a patch, please implement it in the base class so that it works in all the filteredit controls.

I have already tried to look at the sources, but I could not understand how this component works.

ASerge

  • Hero Member
  • *****
  • Posts: 2223
Re: TListFilterEdit and filter
« Reply #4 on: March 21, 2019, 06:59:02 pm »
Is not this datum obtained simply by reading the .FilteredListBox.Count subproperty?
No
In which cases this is "No"? Logically, @howardpc is right because only items that match the filter are displayed in the filtered list.

bonmario

  • Sr. Member
  • ****
  • Posts: 346
Re: TListFilterEdit and filter
« Reply #5 on: March 21, 2019, 08:35:22 pm »
Is not this datum obtained simply by reading the .FilteredListBox.Count subproperty?

Sorry, you re right, i have verified.

Thanks, Mario

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: TListFilterEdit and filter
« Reply #6 on: March 22, 2019, 09:55:49 am »
Is not this datum obtained simply by reading the .FilteredListBox.Count subproperty?
Yes indeed. I did not think of it.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018