]> Creatis software - bbtk.git/blob - packages/wx/bbs/appli/wxTour.bbs
*** empty log message ***
[bbtk.git] / packages / wx / bbs / appli / wxTour.bbs
1 description "A tour of wx boxes"
2 author "laurent.guigues@creatis.insa-lyon.fr"
3 category "demo"
4
5 include wx
6 #==================================================================
7 print " "
8 print "============================"
9 print "A Slider whose output is plugged into an OutputText"
10 message echo 2
11
12 # Create the Slider
13 new Slider     slider
14 # Make it signal it has changed when it is moved (not only released)
15 set slider.ReactiveOnTrack 1
16 # Create the OutputText
17 new OutputText text
18 # Add the Layout
19 new LayoutLine main
20 # Make it a Dialog 
21 set main.WinDialog true
22
23 # Setting up the Layout :
24 connect slider.Widget    main.Widget1
25 connect text.Widget      main.Widget2
26
27 # The output of the slider is plugged into the input of the text
28 # To do this, we must have an int to string adaptor, hence load std
29 load std
30 connect slider.Out       text.In
31
32 # Any change of the slider must update the text
33 connect slider.BoxChange text.BoxExecute
34
35 # Go!
36 exec main
37
38 #==================================================================
39 message echo 0
40 clear
41 print " "
42 print "============================"
43 print "Splitting a window into two adjustable parts"
44 #==================================================================
45 message echo 2
46
47 new LayoutSplit main
48
49 set main.WinDialog true
50 exec main
51
52 #==================================================================
53 message echo 0
54 clear
55 #==================================================================