2015-12-23 92 views

回答

1

你可以設置TabSet.selectedTab:

指定最初選擇的選項卡的索引。

樣品:

isc.TabSet.create({ 
    ID: "topTabSet", 
    tabBarPosition: "top", 
    width: 400, 
    height: 200, 
    selectedTab:1, 
    tabs: [ 
     {title: "Blue", icon: "pieces/16/pawn_blue.png", iconSize:16, 
     pane: isc.Img.create({autoDraw: false, width: 48, height: 48, src: "pieces/48/pawn_blue.png"})}, 
     {title: "Green", icon: "pieces/16/pawn_green.png", iconSize:16, 
     pane: isc.Img.create({autoDraw: false, width: 48, height: 48, src: "pieces/48/pawn_green.png"})} 
    ] 
}); 
+0

我試圖調用selectTab的標籤集被繪製,它仍然選擇在索引0處的標籤之前,然後選擇在指定索引 – stackoverfloweth

+0

注意的標籤:我沒有」 t意味着TabSet.selectTab()方法,但是是selectedTab屬性。 – claudiobosticco

+0

完美,再次感謝! – stackoverfloweth