Re: Gtk::Stock::CANCEL

That's interesting. I've been trying via a GtkBuilder GUI on Linux where I select a stock button and neither in Glade3 nor when I run my GUI do the icons show up.


On 10/23/2009 08:25 AM, ga wrote:

On Thu, Oct 22, 2009 at 08:31:44PM -0400, ArbolOne wrote:
I am trying to add a stock icon to a button like this:
this->btnCancel   =  Gtk::manage(new Gtk::Button(Gtk::Stock::CANCEL));
this is supposed to display a button with a X next to it (X Cancel),
just like the Accept button in the example just above the
description of ~Button(), which display a folded arrow pointing to
the left []

However, the button in my application does not display the intended
image, does anyone know what I am doing wrong?

I tried out it in that way as well, and didn't work for me.
Now I'm doing it in this way:

  Gtk::Widget *stckSave = Gtk::manage (new Gtk::Image (Gtk::Stock::SAVE, Gtk::ICON_SIZE_BUTTON));
  m_refCmdOk->set_use_stock (true);
  m_refCmdOk->set_label (_("Save"));
  m_refCmdOk->set_image (*stckSave);



gtkmm-list mailing list
gtkmm-list gnome org
gtkmm-list mailing list
gtkmm-list gnome org

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