打开一个 TabSet 到一个特定的 Tab
Open a TabSet to a specific Tab
默认情况下,绘制 TabSet 时会选中第一个选项卡
我很想知道是否可以将初始选项卡设置为索引 2、3 等处的选项卡
您可以设置TabSet.selectedTab:
Specifies the index of the initially selected tab.
样本:
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"})}
]
});
默认情况下,绘制 TabSet 时会选中第一个选项卡
我很想知道是否可以将初始选项卡设置为索引 2、3 等处的选项卡
您可以设置TabSet.selectedTab:
Specifies the index of the initially selected tab.
样本:
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"})}
]
});