0

我已经使用 sencha touch2 完成了应用程序。根据要求,当鼠标悬停(指向)特定元素时,我需要在工具栏元素内聚焦/突出显示。我添加了pressedCls,一旦我按下它就会起作用,但我需要在鼠标悬停时突出显示。谁能告诉我如何实现这一目标。

这是我的代码:

initialize:function () {
    this.callParent(arguments);
    var Button1 = {
        xtype:"button",
        id: 'suvilasBtn',            
        html: '<img  height="30" width="40", src="resources/sass/images/icons/about.png" />',            
        pressedCls: 'customPressedCls',            
        scope:this
    };
    var Button2 = {
        xtype: "button",
        id: 'projectBtn',
        html: '<img  height="30" width="40", src="resources/sass/images/icons/projects.png" />',
        handler: this.onProjectsButtonTap,
        scope: this
    };
    var bottomToolbar = {
        xtype:"toolbar",
        docked:"bottom",
        scrollable: false,                      
        defaults: {
            iconMask: true,
            ui: 'plain'
        },
        layout: {
            pack : 'center',
            align: 'center'
        },
        items:[
            Button1,
            Button2
        ]
    };
    this.add([ bottomToolbar ]);
}
4

0 回答 0