默认情况下,绘制TabSet时,第一个选项卡会被选中
我很想知道是否可以将初始标签设置为索引2,3等的标签
答案 0 :(得分: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"})}
]
});