Re: Alternative to gtk_widget_set_sensitive on GetComboBoxEntry



Try:

gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE);


Regards,
Salsaman.

http://lives.sourceforge.net
https://www.ohloh.net/accounts/salsaman


On Tue, Mar 12, 2013 at 4:52 PM, Ian Puleston
<ian underpressuredivers com> wrote:
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


_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list



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