Re: popup with colored menuitems



First get a Gtk::Pango::Layout for the widget. Next, use Gtk::Pango::Layout::set_attribute member function, passing a Gtk::Pango::ATTR_FOREGROUND attribute initialized to your desired text foreground color to it; plus, you'll have to insert code doing this job into a slot connected an on_expose signal for the menu.

As usual, if I'm all wet on this, someone correct me.

Bob


Matthias Langer wrote:

Jonathon Jongsma wrote:

what do you mean by "doesn't work"?  Doesn't compile or doesn't change
the color?
It compiles cleanly, but doesn't change the color ...

On 9/30/05, Matthias Langer <mlangc gmx at> wrote:
Is it possible to create popups with menuitems that use colred text in
gtkmm ? At least
p_UIManager->get_widget("some/path")->modify_text(Gtk::STATE_NORMAL,
Gdk::Color("red"));
doesn't work for me (with gtkmm-2.6.4) .

Thanks,
Matthias Langer
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list





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