手风琴小组在extjs上听什么事? [英] What event to listen on accordion panel change in extjs?

查看:198
本文介绍了手风琴小组在extjs上听什么事?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当手风琴小组被点击并变得可见时,什么事情要听?任何代码示例都将是很大的帮助。谢谢!

What event to listen when a accordion panel is clicked and becomes visible? Any code example will be great help. Thanks!

推荐答案

在ExtJS中,手风琴是我们将在Panel上使用的布局。以下是sencha文档的示例(由于您没有提到ExtJS的版本,我假定v4.0):

In ExtJS, Accordion is a layout which we will be using on Panel. Here is a sample example from sencha docs.(As you didn't mention version of ExtJS, I am assuming v4.0) :

Ext.create('Ext.panel.Panel', {
title: 'Accordion Layout',
width: 300,
height: 300,
layout:'accordion',
defaults: {
    // applied to each contained panel
    bodyStyle: 'padding:15px'
},
layoutConfig: {
    // layout-specific configs go here
    titleCollapse: false,
    animate: true,
    activeOnTop: true
},
items: [{
    title: 'Panel 1',
    html: 'Panel content!',
    listeners: {
        afterrender: function(thisCmp, eOpts) //(Ext.Component this, Object eOpts ) {
            // do what you want to do here
        }
    }
},{
    title: 'Panel 2',
    html: 'Panel content!'
},{
    title: 'Panel 3',
    html: 'Panel content!'
}],
renderTo: Ext.getBody()
});

与Panel相关的所有事件都适用于此。查看这些事件的使用情况在这里sencha docs

All events associated with Panel are applicable here. Check out usage of these events here on sencha docs.

这篇关于手风琴小组在extjs上听什么事?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆