Re: [gtkmm] (no subject)
- From: "Greg & Erica WOLSKI" <gewolski msn com>
- To: chris cvine freeserve co uk, gtkmm-list gnome org
- Subject: Re: [gtkmm] (no subject)
- Date: Sat, 25 Oct 2003 04:21:16 +0000
From: Chris Vine <chris cvine freeserve co uk>
To: "Greg & Erica WOLSKI" <gewolski msn com>, gtkmm-list gnome org
Subject: Re: [gtkmm] (no subject)
Date: Sat, 25 Oct 2003 00:22:03 +0100
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)?
Chris.
Passing *image worked.
Thanks
Greg
_________________________________________________________________
Fretting that your Hotmail account may expire because you forgot to sign in
enough? Get Hotmail Extra Storage today!
http://join.msn.com/?PAGE=features/es
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]