Re: [gtkmm] Load Gtk::Stock into a Gdk::Pixbuf?
- From: Daniel <dss home se>
- To: MHL Schulze t-online de (Martin Schulze)
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Load Gtk::Stock into a Gdk::Pixbuf?
- Date: Sat, 21 Sep 2002 18:37:33 +0200
On Sat, 21 Sep 2002 16:41:42 +0200
MHL Schulze t-online de (Martin Schulze) wrote:
> Am 21.09.2002 15:08 schrieb(en) Daniel:
> > Hello!
> >
> > Is it possible to load a Gtk::Stock-icon into a Gdk::Pixbuf in
> > gtk2/gtkmm2?
>
> Sure!
>
> Gtk::Image my_stock(my_stock_id, Gtk::ICON_SIZE_[whatever_you_want]);
> Glib::RefPtr<Gdk::Pixbuf> my_pixbuf = my_stock.get_pixbuf();
>
Actually, this doesn't work. From the ref doc:
---
Glib::RefPtr<Gdk::Pixbuf> Gtk::Image::get_pixbuf ( ) const
Gets the Gdk::Pixbuf being displayed by the Gtk::Image.
The storage type of the image must be Gtk::IMAGE_EMPTY or Gtk::IMAGE_PIXBUF (see get_storage_type()). The caller of this function does not own a reference to the returned pixbuf.
---
I tried to do it this way before I posted to the mailinglist. Well, thanks anyway.
/Daniel
> Regards,
>
> Martin
> _______________________________________________
> 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]