How to put a scroll inside my tabs content?
Here is my code:
{
function myScript(thisObj){
function myScript_buildUI(thisObj){
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette","Panel Estudio Voraz",undefined,{resizable:true});
myPanel.layout.resize();
res = "group{orientation:'column',margins: 0, spacing: 0,\
alignment: ['fill', 'fill'], alignChildren: ['fill', 'top'],\
myTabbedPanel: Panel{type:'tabbedpanel',\
myTab1: Panel{type:'tab', text:'Salidas',margins: [4,8,4,8], spacing: 5, alignChildren: ['fill', 'center'],\
},\
myTab2: Panel{type:'tab', text:'Plecas',\
imageWIP: IconButton{text:'WIP',alignment:['top','top'], preferredSize:[372,180]},\
},\
myTab3: Panel{type:'tab', text:'Stings',\
imageWIP: IconButton{text:'WIP',alignment:['top','top'], preferredSize:[372,180]},\
},\
myTab4: Panel{type:'tab', text:'Menus',\
imageWIP: IconButton{text:'WIP',alignment:['top','top'], preferredSize:[372,180]},\
},\
myTab5: Panel{type:'tab', text:'Wipers',\
imageWIP: IconButton{text:'WIP',alignment:['top','top'], preferredSize:[380,180]},\
},\
},\
}";
myPanel.grp = myPanel.add(res);
myPanel.grp.spacing= 0
myPanel.grp.myTabbedPanel.onChange = function(){
var selectedTab = this.selection;
alert(selectedTab.text); //Alerts the name of the tab that was clicked
alert(selectedTab.reflect.properties);//Alerts the property options available for your tab object
switch(selectedTab.selection.text){
case "Salidas": //If Salidas was clicked...
myPanel.grp.myTabbedPanel.myTab1.ddPanel.selection = 0
break;
case "Plecas": //If Plecas was clicked...
myPanel.grp.myTabbedPanel.myTab1.ddPanel.selection = 0
break;
//and so on for the other tabs you have.
default:
break;
}
}
//END PANEL --------------------------- NO PONER NADA ABAJO DE ESTA LÍNEA -------------------------------
return myPanel;
}
var myScriptPal = myScript_buildUI(thisObj);
if((myScriptPal != null) && (myScriptPal instanceof Window)){
myScriptPal.center();
myScriptPal.show();
}
}
myScript(this);
}