Re: Determining widget type

Kjell Ahlstedt via gtkmm-list <[email protected]>
Newsgroups gmane.comp.gnome.gtkmm
Message-ID <[email protected]>
On 2020-03-27 16:54, Phil Wolff via gtkmm-list wrote:
> I want to modify the primary message widget so I can select and copy 
> the text.
>
>     Gtk::Box* pBox = pDialog->get_content_area ();
>     std::vector<Gtk::Widget* > v = pBox->get_children ();
>     Glib::ustring str = ((Gtk::Label*)v[0])->get_label ();
>
> This fails: Gtk-CRITICAL: 08:51:12.080: gtk_label_get_label: 
> assertion 'GTK_IS_LABEL (label)' failed
>
> So the primary message widget isn't a Gtk::Label. How do I determine 
> what it is?
>
>
Is your dialog a MessageDialog? If it is, use get_message_area() instead 
of get_content_area().
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.