Select to view content in your preferred language

Programmatic example esri/toolbars/navigation

654
0
06-14-2013 10:23 AM
YgorThomaz
Emerging Contributor
Hello,

Anyone know how to create a "esri / toolbars / navigation" in Programmatic mode?

Like that : http://dojotoolkit.org/reference-guide/1.9/dijit/Toolbar.html

require([
    "dijit/Toolbar",
    "dijit/form/Button",
    "dojo/_base/array",
    "dojo/domReady!"
], function(Toolbar, Button, array){
    var toolbar = new Toolbar({}, "toolbar");
    array.forEach(["Cut", "Copy", "Paste"], function(label){
        var button = new Button({
            // note: should always specify a label, for accessibility reasons.
            // Just set showLabel=false if you don't want it to be displayed normally
            label: label,
            showLabel: false,
            iconClass: "dijitEditorIcon dijitEditorIcon"+label
        });
        toolbar.addChild(button);
    });
});
<span id="toolbar"></span>


Thank you!
0 Kudos
0 Replies