from pyfbsdk import *
from pyfbsdk_additions import *
def OnChange(control,event):
print control.Text
def PopulateLayout(mainLyt):
m = FBMemo()
x = FBAddRegionParam(0,FBAttachType.kFBAttachLeft,"")
y = FBAddRegionParam(0,FBAttachType.kFBAttachTop,"")
w = FBAddRegionParam(0,FBAttachType.kFBAttachRight,"")
h = FBAddRegionParam(0,FBAttachType.kFBAttachBottom,"")
mainLyt.AddRegion("memo","memo", x, y, w, h)
mainLyt.SetControl("memo",m)
sl = FBStringList()
sl.Add ("String 1")
sl.Add ("String 2")
m.SetStrings(sl)
sl2 = FBStringList()
m.GetStrings(sl2)
print "printing string list"
for s in sl2:
print s
m.OnChange.Add(OnChange)
def CreateTool():
t = CreateUniqueTool("Memo Example")
t.StartSizeX = 300
t.StartSizeY = 300
PopulateLayout(t)
ShowTool(t)
CreateTool()