Jump to content
MarkShark

Listview control with filtering like File Explorer

Recommended Posts

Windows file explorer in detail view shows combobox-like headers (on hover over) that allow filtering the data based on the column type (for example to only show files changed today, or to only show Excel documents.)  Does anyone know if this is something that the standard TListView control is capable of directly, or is this more an owner draw header type thing?  Alternately, is there a similar control that can do this?  The TVirtualStringTree in column mode perhaps?   My searches on this haven't panned out so I'm wondering if anyone has any suggestions or thoughts.  Thanks!

 

-Mark

 

Share this post


Link to post

I use TMS TadvStringGrid when I need to do this, but it is not free and not available on its own.  It can build the combobox with an entry for every different value in the column, or you can override it to create entries manually such as 1-20. 21-40, >40, and filter them yourself.  It puts an icon in the header row which you click on to filter.  I am sure that there are other grids available from other vendors with this capability, but I happen to use TMS

  • Like 1

Share this post


Link to post

I'm curious as well. There are some Windows-specific features that get merged into Delphi almost as soon as they show up in the OS, while others like these never seem to make it.

They're still using an ancient version of the DLL interface that wraps the RichEdit control. If you want access to the latest features, you need to resort to API calls and callbacks.


Why should we have to buy 3rd-party controls to get access to stuff that's in Windows DLLs that hasn't been updated in years?

 

This is another argument in favor of open-sourcing the VCL -- so access to new features in Windows isn't competing for resources needed to add more features to a rarely used library included in the Enterprise or Architect Edition of the product.

 

Delphi keeps growing outward, and very little effort has ever been expended to update the inner-most features of controls, except stuff that's in the base objects that affects almost everything. Keeping current with updates to Windows common controls has never been very high on any new release priority list ever.

Share this post


Link to post
1 hour ago, David Schwartz said:

This is another argument in favor of open-sourcing the VCL -- so access to new features in Windows isn't competing for resources needed to add more features to a rarely used library included in the Enterprise or Architect Edition of the product.

Nothing prevents from inheriting from Richedit and extending its features. If that wasn't done already then seems no one needs it

  • Like 1

Share this post


Link to post
3 hours ago, David Schwartz said:

This is another argument in favor of open-sourcing the VCL

It's so easy to throw a statement like that out there. Have you thought about the consequences of having the VCL maintained by a bunch of amat^H^H^H^H enthusiasts that are stuck on Delphi 7? Look at the JVCL if you're in doubt of what that would look like.

If you want open source there's plenty to choose from already.

Share this post


Link to post
1 hour ago, Anders Melander said:

Have you thought about the consequences of having the VCL maintained by a bunch of amat^H^H^H^H enthusiasts that are stuck on Delphi 7?

Well, open source doesn't mean "crowd-developed". Look at Chromium or .Net Core - I doubt they accept every change. It's about making source available so that users could send suggestions that probably have a chance to be applied. Wait, oh shi- - more or less things with RTL/VCL already similar to this, and were since the very start.

Edited by Fr0sT.Brutal

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×