[OPEN] [#1629] [4.7.1] Checkbox + setVisible error

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [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

    <%@ 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
    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)

    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 ?
    Last edited by jirihost; Feb 20, 2019 at 11:44 AM.

Similar Threads

  1. Replies: 3
    Last Post: Oct 09, 2018, 4:36 AM
  2. Replies: 1
    Last Post: Sep 10, 2018, 4:26 PM
  3. Replies: 3
    Last Post: May 29, 2013, 3:49 AM
  4. Replies: 10
    Last Post: Apr 25, 2013, 5:38 AM
  5. [CLOSED] Open window from checkbox
    By Adrian in forum 1.x Help
    Replies: 2
    Last Post: Aug 26, 2008, 7:48 PM

Posting Permissions