PDA

View Full Version : Button on Header of ext.Panel



QReader
27 Mar 2016, 11:11 AM
I have new Ext.Panel({
title: 'Header',
hideCollapseTool:true,
collapsible:true,
collapsed: true,
renderTo: 'mywrap',
width: '100%',
height: 'auto'...}


How can I replace this header one button the entire width/height with hover and ? Header? instead of title?

54245

jdkhamba
28 Mar 2016, 4:14 AM
In other words simply place a button on top of panel?

like this ? :

https://fiddle.sencha.com/#fiddle/17qc

Pankaj Kumar M
29 Mar 2016, 11:16 PM
var tbar=Ext.DomHelper.insertFirst(grid.tbar,{tag:'div',id:Ext.id()},true);

tb = new Ext.Toolbar({
renderTo: tbar,
items: ['-',
{
text:"Button",
cls:'x-btn-text-icon',
tooltip:"Button ToolTip.",
handler:buttonHandler
}
]
});

jdkhamba
30 Mar 2016, 3:27 AM
Ext.application({
name: 'Fiddle',


launch: function() {
Ext.widget('viewport', {
items: [{
xtype: 'panel',
html: 'panel content',
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
layout: 'fit',
items: [{
xtype: 'button',
text: 'Button 1'
}]
}]
}




]






})
}
});

QReader
2 Apr 2016, 1:59 AM
Thanks!