gpt4 book ai didi

extjs - 如何在extjs中隐藏水平线

转载 作者:行者123 更新时间:2023-12-02 17:33:46 25 4
gpt4 key购买 nike

this.horizontalLine = {
xtype: 'box',
hidden: false,
autoEl : {
tag : 'hr'
}
};

我想隐藏这条水平线。但是

this.horizontalLine.hide()

未定义。我也尝试使用 this.horizo​​ntalLine.hidden = true。在这种情况下,隐藏属性设置为 true 但该行仍然可见。还有其他方法吗?

最佳答案

我通过在面板中放置水平线并隐藏面板来解决这个问题。

    this.rulesLabel = new Ext.form.Label({
text : 'Rules:',
style : 'font-size:11px;font-weight:bold;color:#15428B;padding-right:10px;padding-top:50px; margin-left:10px;'
});

this.horizontalLine = {
xtype: 'box',
autoEl : {
tag : 'hr'
}
};

this.lineHolder = new Ext.Panel({
id: 'lineHolder',
hidden : true,
border: false,
layout : 'form',
bodyStyle : 'padding-top:10px;',
items : [{xtype: 'box'},this.rulesLabel, this.horizontalLine]
});

我使用了 this.lineHolder.show()this.lineHolder.hide() 来分别显示和隐藏线。

关于extjs - 如何在extjs中隐藏水平线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29491882/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com