3 rem Get reference to current active frame. Most time this will be
4 rem the basic ide by himself.
5 xTestFrame
= StarDesktop
.ActiveFrame
7 rem Create more then one indicator objects for this frame.
8 xIndicator1
= xTestFrame
.createStatusIndicator()
9 xIndicator2
= xTestFrame
.createStatusIndicator()
10 xIndicator3
= xTestFrame
.createStatusIndicator()
12 rem Check status of creation. No null references should be detected.
13 if( isNull(xIndicator1
)=TRUE ) or ( isNull(xIndicator2
)=TRUE ) or ( isNull(xIndicator3
)=TRUE ) then
14 msgbox
"Error: Could not create status indicators!"
18 rem Start working for indicator 1 and 2.
19 rem The window should NOT be shown!
20 xIndicator1
.start( "Indicator 1:", 100 )
21 xIndicator2
.start( "Indicator 2:", 200 )
22 msgbox
"Indicator 1 and 2 was started ... the window should NOT be shown!"
24 rem Start working for indicator 3.
25 rem The window should be shown! It's the most active one.
26 xIndicator3
.start( "Indicator 3:", 300 )
27 msgbox
"Indicator 3 was started ... the window should be shown!"
29 rem Set different values and texts for indicator 1 and 2.
30 rem These values are not visible.
31 xIndicator1
.setValue( 25 )
32 xIndicator2
.setValue( 50 )
34 rem Work with indicator 3.
35 rem If working finished automaticly indicator 2 is reactivated.
38 xIndicator3
.setText( "Indicator 3: Range=300 Value=" + i
)
39 xIndicator3
.setValue( i
)
44 rem Delete indicator 2 before you deactivate number 3!
45 rem The next automaticly activated indicator will be the number 1.
47 msgbox
"Indicator 3 will be destroyed. Indicator 2 was deleted ... number 1 must reactivated automaticly!"
50 rem Work with indicator 1.
51 rem If working finished automaticly the window will be destroyed.
54 xIndicator1
.setText( "Indicator 1: Range=100 Value=" + i
)
55 xIndicator1
.setValue( i
)
59 xIndicator1
.setText( "Indicator 1: ... reset values to defaults" )
62 xIndicator1
.setText( "Indicator 1: ... set 50 % for progress" )
64 xIndicator1
.setValue( 50 )
65 msgbox
"Indicator 1 will be destroyed. Indicator window must destroyed automaticly!"
68 msgbox
"Test for status indicator finished successful!"