Gtk::Entry - cant change bg_color
- From: thom_schu gmx de
- To: gtkmm-list gnome org
- Subject: Gtk::Entry - cant change bg_color
- Date: Sun, 22 Jan 2006 15:08:25 +0100 (MET)
Hello,
Im trying to change the background-color of an Gtk::Entry.
After trying to change the color without success with "entry->modify_bg()",
I searched for help in the gtkmm-list and found that the solution is
"entry->modify->base()", but also this didnt work for me.
After testing many ways without success I came to the follow solution :
Glib::RefPtr<Gtk::RcStyle> style = Gtk::RcStyle::create();
Gdk::Color color;
color.set_rgb(60000, 60000, 60000);
entry->modify_style(myStyle);
entry->modify_base(Gtk::STATE_INSENSITIVE, color);
So after I set a new RcStyle-Object for the entry-Object I was finally able
to change the background-color. (want a grayed out entry, if entry is
deactivated ...)
But this doenst still satisfy me, because first I think this can not be the
right way to change the background-color and second this way gives the entry
a new appearance.( another border with shadow ......)
thanks in advance
gizmo
--
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]