Alternative to gtk_widget_set_sensitive on GetComboBoxEntry



Hi,

 

I have a dialog with a GetComboBoxEntry and under certain circumstances I need to make it non-user-editable, but still want it to display the selected entry. I’m using gtk_widget_set_sensitive to disable it, but a side effect of that is that when set insensitive it displays blank and does not show the selected entry.

 

I can’t say 100% for sure but I think that this used to work with earlier versions of GTK? I say that because my code gets the selected entry via a gtk_combo_box_get_active_text call on it, and that is now failing (returning an empty string) and throwing an error when the combo is insensitive, and I’m pretty sure that it never used to get that error.

 

The latter problem I’ve worked around, but I would still like the control to show the user which entry is selected when it is not enabled (just like a disabled _javascript_ select element does). So is there a way to make it do that?

 

This is with the latest GTK 2.

 

Thanks,

Ian



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