1
2
3
4
5
6
7
8
9
10
11
12from pyfbsdk import *
13from pyfbsdk_additions import *
14
15def ValueChange(control,event):
16 print(control.Value)
17
18def Transaction(control,event):
19 print("Transaction, is begin: ", event.IsBeginTransaction)
20
21
22def PopulateLayout(mainLyt):
23 x = FBAddRegionParam(0,FBAttachType.kFBAttachLeft,"")
24 y = FBAddRegionParam(0,FBAttachType.kFBAttachTop,"")
25 w = FBAddRegionParam(0,FBAttachType.kFBAttachRight,"")
26 h = FBAddRegionParam(0,FBAttachType.kFBAttachBottom,"")
27 mainLyt.AddRegion("main","main", x, y, w, h)
28
29 lyt = FBHBoxLayout()
30 mainLyt.SetControl('main', lyt)
31
33 hs.Orientation = FBOrientation.kFBHorizontal
34 hs.SmallStep = 10
35 hs.LargeStep = 10
36 hs.OnChange.Add(ValueChange)
37 hs.OnTransaction.Add(Transaction)
38 lyt.Add(hs, 150, height=25)
39
41 vs.Orientation = FBOrientation.kFBVertical
42 lyt.Add(vs, 25, height=150)
43
44
45def CreateTool():
46
47 t = FBCreateUniqueTool("Slider Example")
48 t.StartSizeX = 400
49 t.StartSizeY = 400
50
51
52 PopulateLayout(t)
53 ShowTool(t)
54
55
56CreateTool()
57
Slider.
Definition: pyfbsdk_generated.h:17460