Ignore:
Timestamp:
27-08-10 11:40:57 (21 months ago)
Author:
lvels
Message:

added attribute startuptab

File:
1 edited

Legend:

Unmodified
Added
Removed
  • flamingo/trunk/fmc/classes/gui/TabControler.as

    r571 r574  
    1818* @hierarchy child node of Flamingo  
    1919* @example 
    20 * <fmc:TabControler left="left" width="300" top="top" bottom="bottom" borderalpha="0"> 
     20* <fmc:TabControler left="left" width="300" top="top" bottom="bottom" borderalpha="0" startuptab="1"> 
    2121                <fmc:Tab width="100%" height="100%"> 
    2222                        <string id="buttonlabel" nl="Kaartlagen"/> 
     
    3434                </fmc:Tab> 
    3535        </fmc:TabControler> 
     36 * @attr startuptab default:0 The tab number(0 is the first tab, 1 is the second tab etc.) of the tab that should be opened at startup  
    3637 **/ 
    3738 
     
    4748        private var tabs : Array; 
    4849        private var numTabs : Number; 
     50        private var startuptab: Number = 0; 
    4951        var buttons:MovieClip = null; 
    5052         
     
    5355                this.setVisible(false); 
    5456        } 
     57         
     58        function setAttribute(name:String, value:String):Void { 
     59        if (name == "startuptab") { 
     60            startuptab = Number(value); 
     61        } 
     62    } 
    5563                 
    5664        function init():Void {   
     
    7684                _global.flamingo.addListener(this,"flamingo",this);      
    7785                this.setVisible(true); 
     86                tabs[startuptab].show(); 
    7887        } 
    7988 
Note: See TracChangeset for help on using the changeset viewer.