Re: EuGTK:Filtering ListViews

new topic     » goto parent     » topic index » view thread      » older message » newer message
euphoric said...

Is there a way to automatically filter a list, or do I need to redo the list with only those items I want to show?

I checked the browser and didn't find any examples.

ADDED: Apparently, I need this: https://developer.gnome.org/gtk3/stable/GtkTreeModelFilter.html

FWIW, in Windows I use *Ownerdrawn* LISTVIEW controls quite a bit so I have full control over what is shown [to the degree it can be shown in grid view]. A normal LISTVIEW control would be fed a copy of your data and can then manipulate/sort it according to its own internal logic. But with Ownerdrawn LISTVIEW controls the data stays with your program which then has the responsibility to do any manipulating. The drawback is that Windows must call your program to redraw each cell in the control. The upside is that you have unfettered access to your own data in native format (ie: integer, atom, sequence). The recent query about sorting floats would have been a non-issue.

I use a linear sequence of integers as an index between the data and the listview control. I can sort/filter/destroy/recreate the index as much as I want. Then I simply redraw the control to reflect the changed index.

Of course, that doesn't help with your current situation..

Spock

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu