Re: [Vala] Setting image on a button?



Yep. Doesn't work.

On Wed, May 18, 2011 at 4:58 AM, Sébastien Wilmet <
sebastien wilmet gmail com> wrote:

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 ();

_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list




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