javascript - is it possible to implement moveable Toolbar with Ext.js, if yes, how to do that with my code? -
it toolbar want move free in position of desktop. need change it? maybe xtype'toolbar' or different extend'ext.panel.panel'??
ext.define('test.view.desktop.toolbar', { bodystyle: "background: #cae1ff; border: 4px solid red;", width: 500, height: 200, extend: 'ext.panel.panel', title: 'test', alias: "widget.testtoolbarx", requires: [ "ext.form.fieldset" ], dockeditems: [ { xtype: 'toolbar', dock: 'top', items: [ { xtype: 'tbtext', text: '<b style="font-size: 20px; margin-left: 300px; color: red;">i toolbar</b>', }, { xtype: 'tbfill', }, { text: 'report', menu: { items: [ { text: 'export' , menu: { items: [ { text: 'pdf' }, { text: 'excel' } , { text: 'csv' } ] } }, { text: 'filter' } ] } }, { xtype: 'cycle', text: 'file', menu: { xtype: 'menu', width: 120, items: [ { text: 'upload' }, { text: 'share' }, { text: 'popout' } ] } }, { xtype: 'button', text: 'help', url: 'http://test/faq.html', //baseparams: { // q: 'html+anchor+tag' //}, tooltip: 'get answers asked questions about' } , //{ // xtype: 'htmleditor', // text: 'help' //} ] } ] });
create window fixed width , add toolbar it.
kyle fransham pointed out i'll show code snippet:
ext.create('ext.window.window', { layout: 'fit', width : 500, dockeditems: { xtype: 'toolbar', items: [{ text: 'button' }, '->', { xtype : 'textfield', name : 'field1', emptytext: 'enter search term' }, '-','text 1', { xtype: 'tbspacer' }, 'text 2' ] } }).show();
Comments
Post a Comment