1
2
3
4
5
6
7
8
9
10
11
12from pyfbsdk import *
13from pyfbsdk_additions import *
14
15
16def PopulateLayout(mainLyt):
17 tab = FBTabControl()
18
19
20 x = FBAddRegionParam(10,FBAttachType.kFBAttachLeft,"")
21 y = FBAddRegionParam(10,FBAttachType.kFBAttachTop,"")
22 w = FBAddRegionParam(-10,FBAttachType.kFBAttachRight,"")
23 h = FBAddRegionParam(-10,FBAttachType.kFBAttachBottom,"")
24
25 mainLyt.AddRegion("tab", "tab",x,y,w,h)
26 mainLyt.SetControl("tab", tab)
27
28
29
30 for i in range(3):
31 name = "%s %d" % ("Tab ", i + 1)
32
34
35 x = FBAddRegionParam(10,FBAttachType.kFBAttachLeft,"")
36 y = FBAddRegionParam(10,FBAttachType.kFBAttachTop,"")
37 w = FBAddRegionParam(-10,FBAttachType.kFBAttachRight,"")
38 h = FBAddRegionParam(-10,FBAttachType.kFBAttachBottom,"")
39 l.AddRegion(name,name, x, y, w, h)
40
41 l.SetBorder(name,FBBorderStyle.kFBStandardBorder,True, True,1,0,90,0)
42
43 tab.Add(name,l)
44
45
46 tab.SetContent(0)
47 tab.TabPanel.TabStyle = 0
48
49
50def CreateTool():
51
52 t = FBCreateUniqueTool("TabPanel Example")
53 t.StartSizeX = 400
54 t.StartSizeY = 400
55 PopulateLayout(t)
56 ShowTool(t)
57
58CreateTool()
Used to build the user interface.
Definition: pyfbsdk_generated.h:9906