Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Include Page
    Event selectedTabChange
    Event selectedTabChange
Wichtige Properties:
  • Item
    Include Page
    Property TabIndex
    Property TabIndex
Examples:
  • Tab dynamisch hinzufügen

    Code Block
    languagejava
    themeConfluence
    	// Create and add a new tab 
    	XdevGridLayout myGridLayout = new XdevGridLayout();
    	accordion.addTab(myGridLayout);
    	
    	// Create and add a new tab on position "0"
    	XdevGridLayout myGridLayout2 = new XdevGridLayout();
    	accordion.addTab(myGridLayout2, 0);
    	
    	// Create and add a new tab with caption "MyTab3"
    	XdevGridLayout myGridLayout3 = new XdevGridLayout();
    	accordion.addTab(myGridLayout3, "MyTab3");
    	
    	// Create and add a new tab with caption "MyTab4" and Icon "FontAwesome.BOOKMARK"
    	XdevGridLayout myGridLayout4 = new XdevGridLayout();
    	accordion.addTab(myGridLayout4, "MyTab4", FontAwesome.BOOKMARK);
    	
    	// Create and add a new tab on position "0" with caption "MyTab5" and Icon "FontAwesome.BOOKMARK"
    	XdevGridLayout myGridLayout5 = new XdevGridLayout();
    	accordion.addTab(myGridLayout5, "MyTab5", FontAwesome.BOOKMARK, 0);	
    	
    	// Create and add a new tab on position "0" only with Icon "FontAwesome.BOOKMARK"
    	XdevGridLayout myGridLayout6 = new XdevGridLayout();
    	accordion.addTab(myGridLayout6, null, FontAwesome.BOOKMARK, 0);
  • Tab auswählen

    Code Block
    languagejava
    themeConfluence
    // Get tab by number
    Tab tab = accordion.getTab(0);
    	
    // Get tab by content component 
    Tab tab = accordion.getTab(myGridLayout);
  • Tab entfernen

    Code Block
    languagejava
    // Remove component
    accordion.removeComponent(myGridLayout);
    
    // Remove tab
    Tab tab = accordion.getTab(0);
    accordion.removeTab(tab);
  • Tab selektieren

    Code Block
    languagejava
    // Select the first tab
    accordion.setSelectedTab(0);
    		
    // Select tab that contains component "myGridLayout"
    accordion.setSelectedTab(myGridLayout);
    		
    // Get tab that contains component "myGridLayout" and select it
    Tab t = accordion.getTab(myGridLayout);
    accordion.setSelectedTab(t);
  • Tab deaktivieren

    Code Block
    languagejava
    // Disable first tab (on position "0")
    Tab tab = accordion.getTab(0);
    tab.setEnabled(false);		
    		
    // Disable tab that contains component "myGridLayout"
    accordion.getTab(myGridLayout).setEnabled(false);
  • Tab ausblenden

    Code Block
    languagejava
    // Hide first tab (on position "0")
    Tab tab = accordion.getTab(0)
    tab.setVisible(false);      
    		     
    // Hide tab that contains component "myGridLayout"
    accordion.getTab(0).setVisible(false);
Alle XdevAccordion Methoden