Hi,
I've some doubts about the best way of using sprites with isomorphic for out of the box images that I can't resolve with the online reference guide...
Please consider the following example
I've loaded following css text to define an sprite for an accept icon with two possible states (release/down)
In order to display for example a button with this icon, if a try this code:
The button is displayed withouth the icon
If I set up the icon property to a transparent image I get it right...
But as I've enabled the "down state" button when this become pressed both style css class and src properties are changed
I suppose that I can create also "_blank_Down.png" and all possible button states empty images, but I was wondering If this is a valid approach or if it can be avoid in some way (I've tried with icon set to "blank" but it seems that this special tag not works with Buttons).
Thanks and best regards....
I've some doubts about the best way of using sprites with isomorphic for out of the box images that I can't resolve with the online reference guide...
Please consider the following example
I've loaded following css text to define an sprite for an accept icon with two possible states (release/down)
Code:
.icons16 { background-image: url(spritesheet.png); background-repeat: no-repeat; } .icons16-accept { width: 16px; height: 16px; background-position: -5px -5px; } .icons16-acceptDown { width: 16px; height: 16px; background-position: -31px -5px; }
Code:
var b1 = isc.Button.create({ iconStyle : "icons16 icons16-accept", title: "My Button", showDownIcon: true, width: 150 }); var b2 = isc.Button.create({ icon: "icons16/accept.png", title: "My Button", width: 150 }); var a = isc.VLayout.create({members: [b1, b2]});
If I set up the icon property to a transparent image I get it right...
Code:
var b1 = isc.Button.create({ icon: "icons16/_blank.png", iconStyle : "icons16 icons16-accept", title: "My Button", showDownIcon: true, width: 150 }); var b2 = isc.Button.create({ icon: "icons16/accept.png", title: "My Button", width: 150 }); var a = isc.VLayout.create({members: [b1, b2]});
But as I've enabled the "down state" button when this become pressed both style css class and src properties are changed
I suppose that I can create also "_blank_Down.png" and all possible button states empty images, but I was wondering If this is a valid approach or if it can be avoid in some way (I've tried with icon set to "blank" but it seems that this special tag not works with Buttons).
Thanks and best regards....
Comment