[OPEN] [#1629] [4.7.1] Checkbox + setVisible error
Hello
I have a checkbox that has not been rendered and I need to set setVisible on it
it's failing for me
note that calling setVisible(false) works fine
Code:
<%@ Page Language="C#" %>
<script>
function showWindow() {
var config = {
title: '',
width: 800,
height: 400,
collapsible: false,
modal: true,
items: [
{
xtype: "checkbox",
boxLabel: 'Checkbox',
itemId:'cbo'
}
]
};
var win = new Ext.Window(config);
var cbo = win.down('#cbo');
// not renered, fails with true, works with false
cbo.setVisible(true);
win.show();
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
</head>
<body>
<form runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" Namespace="" RethrowAjaxExceptions="true">
</ext:ResourceManager>
<ext:Button runat="server" Text="Show window" OnClientClick="showWindow()" Height="30"></ext:Button>
</form>
</body>
</html>
Additional question
on code above, when I call win.setVisible it goies into this method
Code:
Ext.define("gh1550", {
override: "Ext.Component",
hide: function () {
var me = this,
zim = me.zIndexManager,
selectTopMostCmp = false,
retVal;
// Checks if the z-index manager is enabled and the on front compoent
// is being hidden.
if (Ext.isObject(zim) && me == zim.front && Ext.isObject(zim.topMost)) {
selectTopMostCmp = true;
}
or this method (depends if hide/show method is called)
Code:
Ext.define("gh1567", {
override: "Ext.form.field.Checkbox",
show: function (animateTarget, callback, scope) {
var me = this,
retVal = me.callParent(arguments);
me.innerWrapEl.setStyle('display', undefined);
return retVal;
}
});
where it fails on me.innerWrapEl (as it was not rendered)
what are those gh1567 and gh1550 overrides ?