Re: Insensitive items in GtkComboBox



On Thu, 2004-12-09 at 12:49 +0200, markku vire suomi24 fi wrote:
> Hi,
> 
> It would be usefull if GtkComboBox could contain insensitive items as well.
> For example, there can be a clearly limited set of choises but some
> of them don't make sense just now. So, instead of removing some items
> from box they would appear insensitive. This is already supported in 
> GtkCellRenderer family that is used in this widget.
> 
> The following API could do the trick:
> 
>   gtk_combo_box_set_sensitive_column(GtkComboBox *box, gint column);
> 
> or
> 
>   gtk_combo_box_set_sensitive_func(...);
> 
> 
> Would this make sense?

You can do this in GTK+ 2.5 using gtk_cell_layout_set_cell_data_func()
and GtkCellRenderer::sensitive. See gtk/tests/testcombo.c for a live
example  ( http://cvs.gnome.org/viewcvs/gtk%2B/tests/testcombo.c?
rev=1.12&view=auto )

Matthias





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