colors of labels in event boxes
- From: Martin Spurek <martin spurek fei vsb cz>
- To: gtkmm-list gnome org
- Subject: colors of labels in event boxes
- Date: Wed, 26 Jul 2006 13:01:40 +0200
Hello.
i am quite new in gtk/gtkmm programming and i was solving problem how highlight
certain group of widgets by backround color. I found useful posts here and on
other lists how to make labels with color backround (put them into event
boxes), so the code listed below worked. Now i installed new ubuntu with newer
version of gtkmm stuff (old 2.6.7-1, new 2.8.5-0ubuntu1) and the setting of
background doesnt work any more. So if someone has notice that could help me
thanks in advance.
martin
THE CODE:
//i get in constructor * to event box
//and put inside created label like:
interfaceL = new Gtk::Label("none detected");
m_EventBox1->add(*interfaceL);
//then pack and show and in another place i have this code
// that worked fine but does no more
if(interface->isActive()){
m_EventBox1->modify_bg(Gtk::STATE_NORMAL,Gdk::Color("yellow"));
m_EventBox2->modify_bg(Gtk::STATE_NORMAL, Gdk::Color("yellow"));
m_EventBox3->modify_bg(Gtk::STATE_NORMAL, Gdk::Color("yellow"));
m_EventBox4->modify_bg(Gtk::STATE_NORMAL, Gdk::Color("yellow"));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]