Re: Label.set_pattern does not work in Gtkmm



This is a gtk+ bug. It has been corrected in gtk+ 3.2, but it exists in
many earlier versions.
https://bugzilla.gnome.org/show_bug.cgi?id=658111

If you want underlined text, and you use an earlier version of gtk+ and
gtkmm, use Gtk::Label::set_use_markup() and Pango markup.

Perhaps you can alternatively call Label::set_pattern() after
Box::pack_start(). I think this would work, but I'm not sure.

Kjell

sön 2011-10-16 klockan 08:53 -0700 skrev eypros:
> Hello,
> 
> I am taking my (relatively) first steps in learning Gtkmm. I used the
> examples in "Programming with Gtkmm" and they were working properly until
> the program in Label section (6.1 I think).
> The program compiles and links and is executed but the underline effect is
> never shown. 
> 
> I have test it in other circumstances and it don't do what it was supposed
> to.
> 
> Simple code as that:
> m_Label.set_pattern("_ _");
> m_Label.set_test("ABC");
> m_Box.pack_start(m_Label);
> 
> does not underline A and C. (In the above code m_Label is Gtk::Label and
> m_Box is a Gtk::Box).
> 
> Any idea what's going on? The documentation is really incomplete,
> set_pattern as a member function does not provide a single line of
> information!




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