ygorth

Programmatic example esri/toolbars/navigation

Discussion created by ygorth on Jun 14, 2013
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!

Outcomes