RE: Custom Icon or Images on Buttons



Thanks!  I have converted to using this and I think it will work for me.
The only problem I have now is that I want to be able to set a custom icon
size.  However, the system always forces my icon to be of a certain size.
How can I indicate to the IconFactory to use the size of my icon (the one
from my pixbuf image)?

Thanks,
Bill 


-----Original Message-----
From: gtkmm-list-bounces gnome org [mailto:gtkmm-list-bounces gnome org] On
Behalf Of Jonathon Jongsma
Sent: Thursday, May 18, 2006 11:25 AM
To: Bill Sousan
Cc: gtkmm-list gnome org
Subject: Re: Custom Icon or Images on Buttons

On 5/18/06, Bill Sousan <BillS techsi com> wrote:
>             What is the best way to setup an Icon or Image Pool that I can
> grab custom Icon or Images from in order to place them onto Buttons?  I
have
> looked at themes, Stock Items, and gtkrc files.  However, I am not sure
> which would be best.

You might try looking at IconFactory
(http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1IconFac
tory.html).
 In particular, create the IconFactory and call add_default() to add
that factory to the default list of icon factories.  Then add your
custom icons to this factory (using IconFactory::add()), and you can
then use your custom icons just as you would use stock icons.

Jonner
_______________________________________________
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]