Re: set custom entry background?
- From: Allin Cottrell <cottrell wfu edu>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: set custom entry background?
- Date: Mon, 16 Nov 2015 14:55:45 -0500 (EST)
On Mon, 16 Nov 2015, Emmanuele Bassi wrote:
Hi;
On 15 November 2015 at 19:32, Allin Cottrell <cottrell wfu edu> wrote:
I'm trying to set a custom background for a GtkEntry (as a temporary thing,
by way of an alert for invalid input). I can do that fine for gtk 2 using
gtk_widget_modify_base(), but am struggling with gtk 3.
Use:
gtk_style_context_add_class (gtk_widget_get_style_context (entry),
GTK_STYLE_CLASS_ERROR);
Themes will usually honour this style class for entries, and will set
a red "glow" around it.
Thanks, I like that approach; nice and concise.
Allin Cottrell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]