1
2
3
4
5
6
7
8
9
10
11
12from pyfbsdk import *
13from pyfbsdk_additions import *
14
15def PopulateLayout(mainLyt):
16 lyt = FBVBoxLayout()
17 x = FBAddRegionParam(0,FBAttachType.kFBAttachLeft,"")
18 y = FBAddRegionParam(0,FBAttachType.kFBAttachTop,"")
19 w = FBAddRegionParam(50,FBAttachType.kFBAttachNone,"")
20 h = FBAddRegionParam(0,FBAttachType.kFBAttachBottom,"")
21 mainLyt.AddRegion("main","main", x, y, w, h)
22 mainLyt.SetControl("main",lyt);
23
25 l.Caption = "This is a label!!!!"
26 l.Style = FBTextStyle.kFBTextStyleBold
27 l.WordWrap = True
28 lyt.Add(l, 25)
29
30
31
32
33
34
35
36
37
38
40 l.Caption = "left"
41 l.Style = FBTextStyle.kFBTextStyleItalic
42 l.Justify = FBTextJustify.kFBTextJustifyLeft
43 lyt.Add(l, 25)
44
46 l.Caption = "center"
47 l.Style = FBTextStyle.kFBTextStyleUnderlined
48 l.Justify = FBTextJustify.kFBTextJustifyCenter
49 lyt.Add(l, 25)
50
52 l.Caption = "right"
53 l.Justify = FBTextJustify.kFBTextJustifyRight
54 lyt.Add(l, 25)
55
56
57def CreateTool():
58
59 t = FBCreateUniqueTool("Label Example")
60 t.StartSizeX = 400
61 t.StartSizeY = 400
62 PopulateLayout(t)
63 ShowTool(t)
64
65
66CreateTool()
Text label.
Definition: pyfbsdk_generated.h:9829