I need to show an overlay on button click.To achieve this i have written the following code:-
var miscButton = {
xtype: 'button',
iconCls: 'star',
iconMask: true,
width: 60,
margin: '0 0 0 15',
handler: function(){
fPanel.showBy(this);
}
};
var fPanel = Ext.create('Ext.Panel',{
layout: 'vbox',
width: 150,
height: 300,
style: 'background-color: #5E99CC;',
items: [
{
xtype: 'list',
flex: 1,
itemTpl: '{item}',
data: [
{item: 'item1'},
{item: 'item2'},
{item: 'item3'},
{item: 'item4'},
{item: 'item5'},
{item: 'item6'},
{item: 'item7'},
{item: 'item8'},
{item: 'item9'},
{item: 'item10'},
{item: 'item11'},
{item: 'item12'},
]
}
]
});
When i click on button it is showing the overlay perfectly but after another click it is not able to hide the overlay,like given in the link http://docs.sencha.com/touch/2-0/#!/example/overlays.
I dont understand what is the problem with showBy(). Please help me to solve this problem.
Thanx in advance.