self.button = gtk.Button(stock=gtk.STOCK_DELETE)
Only Shows:
Delete
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a recent change in GTK – the developers wanted icons not to appear on buttons. On Linux, this can be changed by editing the
gconfkeyOn windows, I think (I haven’t actually tried this) that you need to set a value in your gtkrc file (for me it’s in
C:\Program Files\Gtk+\etc\gtkrc) and use a theme that supports icons (I think the default one doesn’t).You can also add
gtk-button-images = 1to your~/.gtkrc-2.0file after setting the theme which may over ride the option fromgconf.EDIT in answer to your comment:
Just like this answer, but in Python: In Gtk, how do I make a Button with just a stock icon?
For python, it’s just