]> Creatis software - bbtk.git/blobdiff - packages/wx/bbs/appli/exampleSynchronizeWidgets.bbs
MagicBox : support of data synchronization + various related fixes
[bbtk.git] / packages / wx / bbs / appli / exampleSynchronizeWidgets.bbs
diff --git a/packages/wx/bbs/appli/exampleSynchronizeWidgets.bbs b/packages/wx/bbs/appli/exampleSynchronizeWidgets.bbs
new file mode 100644 (file)
index 0000000..1a46524
--- /dev/null
@@ -0,0 +1,36 @@
+description "Show how to synchronize multiple sliders (when one changes all the others are updated)"
+author "laurent.guigues@creatis.insa-lyon.fr"
+category "example"
+
+load wx
+load std
+
+new Slider slider1
+new Slider slider2
+new Slider slider3
+new Slider slider4
+new LayoutLine layout
+new MagicBox position
+
+set position.In 20
+set position.BoxProcessMode Reactive
+
+connect slider1.Out position.In1
+connect slider2.Out position.In2
+connect slider3.Out position.In3
+connect slider4.Out position.In4
+connect position.Out slider1.In
+connect position.Out slider2.In
+connect position.Out slider3.In
+connect position.Out slider4.In
+
+connect slider1.Widget layout.Widget1
+connect slider2.Widget layout.Widget2
+connect slider3.Widget layout.Widget3
+connect slider4.Widget layout.Widget4
+
+//message process 3
+//message change 1
+//message data 1
+exec layout
+