from pyfbsdk import *
from pyfbsdk_additions import *
def PopulateLayout(mainLyt):
lyt = VBoxLayout()
x = FBAddRegionParam(0,FBAttachType.kFBAttachLeft,"")
y = FBAddRegionParam(0,FBAttachType.kFBAttachTop,"")
w = FBAddRegionParam(50,FBAttachType.kFBAttachNone,"")
h = FBAddRegionParam(0,FBAttachType.kFBAttachBottom,"")
mainLyt.AddRegion("main","main", x, y, w, h)
mainLyt.SetControl("main",lyt);
l = FBLabel()
l.Caption = "This is a label!!!!"
l.Style = FBTextStyle.kFBTextStyleBold
l.WordWrap = True
lyt.Add(l, 25)
l = FBLabel()
l.Caption = "left"
l.Style = FBTextStyle.kFBTextStyleItalic
l.Justify = FBTextJustify.kFBTextJustifyLeft
lyt.Add(l, 25)
l = FBLabel()
l.Caption = "center"
l.Style = FBTextStyle.kFBTextStyleUnderlined
l.Justify = FBTextJustify.kFBTextJustifyCenter
lyt.Add(l, 25)
l = FBLabel()
l.Caption = "right"
l.Justify = FBTextJustify.kFBTextJustifyRight
lyt.Add(l, 25)
def CreateTool():
t = CreateUniqueTool("Label Example")
t.StartSizeX = 400
t.StartSizeY = 400
PopulateLayout(t)
ShowTool(t)
CreateTool()