jiancha
5 Dec 2011, 1:37 AM
Hello,
Here is my example code:
Ext.application({
launch : function() {
var b = Ext.create('Ext.Button', {
text : 'Btn',
//fullscreen: false,
centered: true,
renderTo : Ext.getBody(),
width: 70,
height: 70,
id: 'btn1',
handleMouseEvents: true,
afterRender: function(){
Ext.getCmp('btn1').on('mouseover', function(event, el){
alert('mouseover in afterRender');
});
},
handler: function(){
alert('clicked in handler!');
},
listeners : {
click : function() {
alert('I was clicked in listeners!');
},
'mouseover': function() {
//set a new config which says we moused over, if not already set
if(!this.mousedOver) {
this.mousedOver = true;
alert('mouseover in listeners 1 !');
}
},//This is not working
mouseover: function() {
//set a new config which says we moused over, if not already set
if(!this.mousedOver) {
this.mousedOver = true;
alert('mouseover in listeners 2!');
}
}
},
});
Ext.getCmp('btn1').on('click', function(){
alert('I am clicked in on!');
});
Ext.getCmp('btn1').on('mouseover', function(){
alert('I am mousseovered in on');
});
}
});
this code works fine in online portal. I use chrome browser with version 15.0.874. but It didn't work on chrome, only handler fires when I clicked on it.
Questions:
1) if I dont set config option 'fullscreen', whether false or true, I can't see the button on chrome.
2) Some examples show me
mouseover: function() {} and others show
'mouseover': function() {}, but both not working for me on chrome
can someone help on it ?
thanks,
Here is my example code:
Ext.application({
launch : function() {
var b = Ext.create('Ext.Button', {
text : 'Btn',
//fullscreen: false,
centered: true,
renderTo : Ext.getBody(),
width: 70,
height: 70,
id: 'btn1',
handleMouseEvents: true,
afterRender: function(){
Ext.getCmp('btn1').on('mouseover', function(event, el){
alert('mouseover in afterRender');
});
},
handler: function(){
alert('clicked in handler!');
},
listeners : {
click : function() {
alert('I was clicked in listeners!');
},
'mouseover': function() {
//set a new config which says we moused over, if not already set
if(!this.mousedOver) {
this.mousedOver = true;
alert('mouseover in listeners 1 !');
}
},//This is not working
mouseover: function() {
//set a new config which says we moused over, if not already set
if(!this.mousedOver) {
this.mousedOver = true;
alert('mouseover in listeners 2!');
}
}
},
});
Ext.getCmp('btn1').on('click', function(){
alert('I am clicked in on!');
});
Ext.getCmp('btn1').on('mouseover', function(){
alert('I am mousseovered in on');
});
}
});
this code works fine in online portal. I use chrome browser with version 15.0.874. but It didn't work on chrome, only handler fires when I clicked on it.
Questions:
1) if I dont set config option 'fullscreen', whether false or true, I can't see the button on chrome.
2) Some examples show me
mouseover: function() {} and others show
'mouseover': function() {}, but both not working for me on chrome
can someone help on it ?
thanks,