:: Forum >>
Change the image of the buttons
Hi everyone,
I'm trying to change the image of the controls (buttons) and I don't understand exactly how it works. Ok, I found a png file where seems to be all the icons, but how I can define my own? Now only home, favorites, find... are available.
Thx in advance
Jose
Tuesday, October 18, 2005
Tuesday, October 18, 2005
Yes, for each icon you have to add css rule which maps image name to either separate file or region in 'image library':
.aw-image-home {background: url(icons.png) -40px 0px;}
.aw-image-favorites {background: url(icons.png) -80px 0px;}
.aw-image-search {background: url(icons.png) -120px 0px;}
.aw-image-fontsize {background: url(icons.png) -160px 0px;}
Alex (ActiveWidgets)
Tuesday, October 18, 2005
If you want to add your own images, you can do so like this:
.aw-image-myImageName {background:url(myImage.gif) 0px 0px;}
You can add as many of these as you like in your CSS file. Naturally, myImage.gif can be any name of a gif or png (I have not tried a JPG, but I don't see why it won't work although it might look funny if the background of the image doesn't mathc the background of the object you are using it on)
Jim Hunter
Tuesday, October 18, 2005
Thank you!!!!!
Jose
Thursday, October 20, 2005
more simple method:
var obj = new AW.UI.Button;
obj.setControlText("<img src=save.gif height=14></img> Click me");
Kostya Volkov
Sunday, November 5, 2006
I am trying to use the above, it works, But, what is the best way to adjust
the image size to the control size , for example what if the image is 72px by 72px
Chris Mindrum
Thursday, April 19, 2007
This topic is archived.
Back to support forum
Forum search