首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >默认选择按钮extjs4.1

默认选择按钮extjs4.1
EN

Stack Overflow用户
提问于 2013-10-02 17:41:47
回答 1查看 85关注 0票数 0

我有两组按钮(在Extjs 4.1中),一次只能选中一个。问题是,我希望在开始时(当网格加载时)检查其中一个。代码如下:

代码语言:javascript
复制
{
    xtype : 'checkboxgroup',
    store : checked,
    columns : 3,
    vertical : false,
    singleSelect: true,
    items : [
        {
        xtype: 'button',
        text: 'name',
        width: 75,
        toggleGroup: 'mygroup',
        enableToggle: true,
        listeners: {
                click: function(th) {
                //this == the button, as we are in the local scope
                    checked = [1,0,0];
                }}
        }, {
        xtype: 'button',
        text: 'buyer_member_id',
        width:100,
        toggleGroup: 'mygroup',
        enableToggle: true,
        listeners: {
                click: function(th) {
                //this == the button, as we are in the local scope
                    checked = [0,1,0];
                }}
        }, {
        xtype: 'button',
        text: 'id',
        width: 50,
        toggleGroup: 'mygroup',
        enableToggle: true,
        listeners: {
                    click: function(th) {
                //this == the button, as we are in the local scope
                    checked = [0,0,1];
                }}
        }
    ]}

我找到了一些帮助in the Sencha forum,但是我不能解决这个问题。

EN

回答 1

Stack Overflow用户

发布于 2013-10-02 17:56:51

这就是这个词:

代码语言:javascript
复制
    pressed: true,

插入到按钮配置说明中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19134057

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档