Re: making GtkEntry *look* uneditable



Ah, gtk_widget_set_sensitive is good to know, but I found out how to grey
out the entry which I think looks better (for my app).  Here's how I did
it, in case any unlucky fellow finds themself in my position later:
GdkColor color;
color = gtk_widget_get_default_style()->bg[GTK_STATE_NORMAL];
gtk_editable_set_editable(GTK_EDITABLE(read_only_entry), FALSE);
gtk_widget_modify_base(read_only_entry, GTK_STATE_NORMAL, &color);

This also leaves the cursur intact, so users can select the read-only text.

 -Peter W

Michael Koppelman said:
gtk_widget_set_sensitive ?

Michael







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