Re: [Vala] Setting image on a button?



Hello,

On Tue, May 17, 2011 at 08:10:55PM -0500, Damien Radtke wrote:
Ah, maybe I should've been more clear. It works if the image is the only
thing on the button, but I want to have both text and the image, and it
doesn't work if the button already has text on it (even if I use
image.show()).

Is the following code what you want to achieve?

Button button = new Button.with_label ("Clear All");
Image image = new Image.from_stock (Stock.CLEAR, IconSize.MENU);
button.set_image (image);
button.show_all ();

Attachment: pgpc1PNklHOHg.pgp
Description: PGP signature



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