Re: [gtkmm] (no subject)

On Friday 24 October 2003 9:46 am, Greg & Erica WOLSKI wrote:
> How do I put image into ButtonElem of Toolbar
> I tried something like that:
> Gtk::Image *const image = new Gtk::Image("file_name");
> .
> .
> .
> m_Toolbar.tool().push_back( ButtonElem("string", image, SigC::slot(*this,
> &m_Window::on_menu_option3), "string") );
> I think I don't understand how to put the image into some kind of widget.
> Can you help me?

Assuming file_name is a valid image file, this looks OK except that the 
ButtonElem constructor takes the Gtk::Image object as a reference rather than 
a pointer: in other words, pass it *image, not image.

If that is not the problem, what error is your compiler reporting (or is it a 
run-time error)?


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