Re: list store visibility for combo boxes



On Wednesday 27 October 2004 18:17, Danyel Bruggink wrote:

> I have implemented the new combo box with a model that I am displaying in
> another view.  There are instances where I do not want to delete an iter
> from the model because I'm displaying them elsewhere but I do not want the
> entry for that iter displayed in my combo box drop down.  I tried using the
> visible attribute on the cell layout and while it does make the text of the
> entry disappear, it still has an empty line selectable in the drop down
> which isn't the behaviour I wanted.
>
> Does anyone know if it's possible to use the new combo box in this manner? 

You could put a GtkTreeModelFilter between the combo box and your model and 
then have your visibility function filter out the rows that you don't want to 
display. In other words: make your list store the child of the filter model, 
and then set the filter model as model in the combo box.

Cheers
 -Tim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]