0

ボタングループでボタンをすべて非表示にすると、ボタングループ内に4つのボタンがあります。このバグは ExtJs3 ですか、それとも私が行ったものですか?

これは私が非表示ボタンに使用したものです

var theSameButton = Ext.getCmp('my_button_id');
theSameButton.hide();
4

1 に答える 1

1

「my_button_id」がボタン グループ ID だと思います。あなたのコードを投稿できますか?ボタンを 1 つだけ非表示にする場合は、以下のコードを試してください。

Ext.onReady(function(){
var Window = new Ext.Window(
            {
                width : 340,
                height : 150,
                iconCls : 'upload',
                defaults : {
                    bodyStyle : 'padding:0px'
                },
                items : [{
        xtype: 'buttongroup',
        id:'buttonGrp',
        items: [{
            text: 'Paste',id:'button1',handler : function(){ Ext.getCmp('button2').hide();}
        },{
            text: 'Copy',id:'button2'
        },{
            text: 'Format',id:'button3'
        }]
    } ]
            });
    Window.show();
});
于 2013-07-23T10:57:53.097 に答える