Re: Gtk::Stock::CANCEL



Hi,

On Thu, Oct 22, 2009 at 08:31:44PM -0400, ArbolOne wrote:
> Hello,
> 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 [http://library.gnome.org/devel/gtkmm/unstable/classGtk_1_1Button.html]
> 
> 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);


agurr

> 
> TIA
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list


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