1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    104
    Answers
    4
    Vote Rating
    0
    izak18 is on a distinguished road

      0  

    Default Answered: Hide Tab in TabPanel

    Answered: Hide Tab in TabPanel


    Hi, i need help with that situation, I need to hide a tab of my tabPanel with a condition (if else), this is my code:

    Code:
    documentoView = Ext.extend(Ext.TabPanel,{
    	fullscreen: true,
    	items: [
    	{
    		layout: 'fit',
    		title: 'Datos de cabecera',
    		items: [formDoc]
    	},
    	{
    		layout: 'fit',
    		title: 'Datos de detalle',
    		items: [detalleTabPanel]
    	},
    	{
                   //This is the Tab that I want to hide
    		layout: 'fit',
    		title: 'Plan de Facturación',
    		items: [planFactPanelPrincipal]
    	}],
    	listeners: {
    		'render': function (thisComponent) {
    			if(pedidoStore.last()){
    				var doc = pedidoStore.last().data.ClaseDocumento;
    				if(doc == 'Z004'){
    					thisComponent.getComponent(2).hide();
    				}
    				else{
    					thisComponent.getComponent(2).show();
    				}
    			}
    		}
    	}
    });
    Thanks in advance.

  2. I found a solution.

    Code:
    if(doc == 'Z004'){        thisComponent.remove('tab3');
    
    }
    Thanks anyway.

  3. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    104
    Answers
    4
    Vote Rating
    0
    izak18 is on a distinguished road

      0  

    Default


    I found a solution.

    Code:
    if(doc == 'Z004'){        thisComponent.remove('tab3');
    
    }
    Thanks anyway.

  4. #3
    Sencha User
    Join Date
    Aug 2013
    Posts
    5
    Vote Rating
    2
    Ru5 is on a distinguished road

      0  

    Default I found a solution.

    I found a solution.


    Set
    Code:
    resizable : true
    for tabpanel.
    Then hide tab:
    Code:
    tabpanel.getComponent(0).tab.hide();

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi