1
2
3
4
5
6
7
8
9
10
11
12from pyfbsdk import *
13from pyfbsdk_additions import *
14
15
16def PopulateLayout(mainLyt):
17 x = FBAddRegionParam(0,FBAttachType.kFBAttachLeft,"")
18 y = FBAddRegionParam(0,FBAttachType.kFBAttachTop,"")
19 w = FBAddRegionParam(0,FBAttachType.kFBAttachRight,"")
20 h = FBAddRegionParam(0,FBAttachType.kFBAttachBottom,"")
21 mainLyt.AddRegion("main","main", x, y, w, h)
22
23
25 mainLyt.SetControl("main",scroll)
26
27 scroll.Content.AddRegion( "content", "content", x, y, w, h )
28
29 lyt = FBGridLayout()
30
31 scroll.Content.SetControl("content", lyt)
32
33
34 scroll.SetContentSize(800, 800)
35
36
37 for i in range(7):
38 for j in range(7):
40 b.Caption = "%d, %d" % (i, j)
41 lyt.Add(b, i, j)
42
43
44def CreateTool():
45
46 t = FBCreateUniqueTool("Scrollbox Tool Example")
47 t.StartSizeX = 400
48 t.StartSizeY = 400
49 PopulateLayout(t)
50 ShowTool(t)
51
52CreateTool()