Nicolas
February 19, 2013, 10:36am
#1
Hi,
I use DHX toolbar v.3.5 build 120822 and i want to know if it is possible to change the style / css of certain buttons in the toolbar. What i want to do is having some buttons surrounded by red borders, some with green, some with blue, …
Best regards
Nicolas
Darya
February 19, 2013, 10:56am
#2
Hi
You can do something like this:
obj = toolbar.objPull[toolbar.idPrefix + ITEM_ID].obj;
obj.style.borderColor = “red”;
bajo
September 10, 2013, 3:58pm
#5
It doesn’t work for me, could you make some other examples?
Thanks for your job,
bajo.
Darya
September 12, 2013, 9:26am
#6
Here is little code sample for you
[code]
Toolbar
html,body { height: 100%; margin: 0px; overflow: hidden; }
function doOnLoad() {
toolbarData = {
parent: "toolbarObj",
icon_path: "../dhtmlxToolbar/samples/common/imgs/",
skin: 'dhx_skyblue',
items: [{
type: "button",
id: "open",
img: "open.gif"
}, {
type: "button",
id: "save_as",
text: "Save As...",
img: "save_as.gif"
}, {
type: "button",
id: "cut",
img: "cut.gif"
}, {
type: "button",
id: "copy",
img: "copy.gif"
}, {
type: "buttonTwoState",
id: "paste",
img: "paste.gif"
}]
};
toolbar = new dhtmlXToolbarObject(toolbarData);
obj = toolbar.objPull[toolbar.idPrefix+"save_as"].obj;
obj.style.borderColor = "red";
}
</script>
[/code]
The result is the next: