Filtered list widget | developer.brewmp.com Filtered list widget | developer.brewmp.com

Developer

Filtered list widget

Forums:

Hi,

how would it be possible to filter a list widget so that only certain item widgets can be showed based on the value contained in the widget itself?

To make the question a bit clearer, once the list widget is created and displayed, its item widgets may change their visibility according to a dynamic event.
Would it be possible to deploy the listener/indexer mechanism without recreating the vector model - which might be expensive in terms of computational resources?

Thanks.

The first approach was to make invisible the list items which satisfy a particular criteria. That however didn't work out as the layout was behaving strangely.
Also, working around with IWIDGET_SetVarItemSize doesn't seem to give what I am expecting. In fact, despite the extent is set to 1 (0 doesn't seem to be accepted), the list item will be selectable and therefore I think the only way to create a filtered list is to create your own logic around the vector data model and updating the model whenever it changes.

The first approach was to make invisible the list items which satisfy a particular criteria. That however didn't work out as the layout was behaving strangely.
Also, working around with IWIDGET_SetVarItemSize doesn't seem to give what I am expecting. In fact, despite the extent is set to 1 (0 doesn't seem to be accepted), the list item will be selectable and therefore I think the only way to create a filtered list is to create your own logic around the vector data model and updating the model whenever it changes.

Try using a menu model instead of a vector model, then clear the MMF_ENABLED flag on items you don't want displayed.

Try using a menu model instead of a vector model, then clear the MMF_ENABLED flag on items you don't want displayed.

Thanks ErikB,
I'll give it a try as soon as I have some free resources.

Thanks ErikB,
I'll give it a try as soon as I have some free resources.