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

Re: making GtkEntry *look* uneditable



On Tue, Dec 30, 2003 at 04:43:29PM -0800, shark@centibyte.org wrote:
> 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.
>

Have you considered using a label? They can be made selectable in Gtk.

--jkl



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