1
2
3
4
5
6
7
8
9
10
11
12from pyfbsdk import *
13import pyfbsdk_additions
14from pyfbsdk_additions import *
15
16t = FBCreateUniqueTool("Simple Grid Example")
17t.StartSizeX = 400
18t.StartSizeY = 400
19
20x = FBAddRegionParam(0,FBAttachType.kFBAttachLeft,"")
21y = FBAddRegionParam(0,FBAttachType.kFBAttachTop,"")
22w = FBAddRegionParam(0,FBAttachType.kFBAttachRight,"")
23h = FBAddRegionParam(0,FBAttachType.kFBAttachBottom,"")
24t.AddRegion("main","main", x, y, w, h)
25
26
27grid = FBGridLayout()
28t.SetControl("main", grid)
29
30
31
33label.Caption = "Enter your suggestions:"
34
35
36grid.Add(label, 0, 0)
37
38
40
41
42grid.AddRange(memo, 1, 1, 0, 2)
43
44
46ok.Caption = "Ok"
48cancel.Caption = "Cancel"
49
50
51grid.Add(ok, 2, 1)
52grid.Add(cancel, 2, 2)
53
54
55
56
57
58grid.SetRowHeight(0, 30)
59grid.SetRowHeight(2, 30)
60
61
62
63grid.SetColWidth( 1, 45 )
64grid.SetColWidth( 2, 45 )
65
66
67grid.SetColRatio( 0, 1.0 )
68grid.SetRowRatio( 1, 1.0 )
69
70
71ShowTool(t)
Text label.
Definition: pyfbsdk_generated.h:9829
Multi-line text input.
Definition: pyfbsdk_generated.h:10680