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?

Are you sure you mean Column and not Row?

To me, the most logical thing you would ever want to make insensitive is
an item in the model.  I can see perhaps see a reason for insensitive
columns in a fully blown GtkTreeView implementation (e.g. with 7
columns), but you only show one column for a GtkComboBox (unless you
modify the GtkCellLayout which most people do not).

If you have a special case in mind, perhaps you can do what you need
with gtk_cell_layout_set_cell_data_func ()?

-- 
Regards,
Martyn



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