Re: Gtk::DrawingArea gtk_widget_create_pango_layout()

Jeff Simpson wrote:

I'm trying to write text to a Gtk::Drawing area using it as a gdk
drawable and Pango, but I'm having trouble getting the pango layout
out of the widget.

Basically, every variation I try to use ends up with a deadend because
Gtk::DrawingArea isn't a GtkWidget and can't be cast as one. What is
the right method for getting a Pango Layout using gtkmm? Thanks!

  - Jeff

Look at [here is an exapamle]

Gtk::DrawingArea is a Gtk::Widget as you may see at [maybe you confuse that with Gdk::Drawable], so Glib::RefPtr<Pango::Layout> create_pango_layout (const Glib::ustring& text) should be exactly what you need.


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