Re: Gtk::MessageDialog and set_image() method problem



On Fri, 2008-01-04 at 14:34 +0100, Christopher Lang wrote:
> Hi,
> 
> I have some trouble setting a custom image or widget with the set_image(...) 
> method of Gtk::MessageDialog.
> 
> Regardless which widget I use with set_image, the image in the dialog is empty 
> afterwards. It also doesn't work with stock images.
> 
> Any clues or help is appreciated.
> 
> thanks,
> Chris
> 
> 
> /usr/lib64/libgtkmm-2.4.so
> rpm: gtkmm2-2.10.8-2.10
> Suse 10.1
> 
> 
> some_MessageDialog* dialog = new some_MessageDialog(*mwin,
> 						"some text ?",
> 						false,
> 						Gtk::BUTTONS_YES_NO,
> 						true);
> 	dialog->set_secondary_text ("some text");
> 
> 	Gtk::Image* img = new Gtk::Image(PACKAGE_PIXMAPS_DIR"/some-icon-48.png");

Like all widgets, Gtk::Image needs to be shown, by calling its show()
method.
		
> //	Gtk::StockID ("gtk-new"), Gtk::ICON_SIZE_DIALOG);
> 
> 	dialog->set_image (*img);
> 
> 
-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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