Indexed Screen

<< Click to Display Table of Contents >>

 

Indexed Screen

When clicking a pump, its command Screen must be opened. As there is only one command Screen and several pumps, when opening this Screen users must inform the name of a pump to send these commands.

Pump

Pump

1.In the Pump XControl, create a script on the Click event of the figure depicting the pump.

'Pump's full name
Arg = Pump.PumpSource.PathName
'Open CommandScreen
Application.DoModal "CommandScreen", "Command", 0, 0, , , Arg, 1 + 2 + 64 + 2048

 

2.To create the script on the previous exercise, start by typing "Arg = " to create an auxiliary variable in this script, which stores the name of the pump clicked.

3.Select, using AppBrowser, the Pump XControl and, on its right side, the PumpSource property. Click Paste.

4.Finish this line by typing ".PathName". This property returns the full name of a linked PumpTag XObject.

Arg = Pump.PumpSource.PathName

 

5.Select, using AppBrowser, Viewer's DoModal method and click Paste.

Application.DoModal(Screen, Title, Left, Top, Width, Height, Arg, Flags)

 

6.Change the Screen parameter to the name of the Screen to open, "CommandScreen".

7.Change the Title parameter to "Command". This is the title of this Screen, as long as its Caption property remains empty.

8.Change the Left and Top parameters to 0 (zero). This Screen is forced to open centered on another parameter.

9.Change the Width and Height parameters to a space, thus using Screen's original size.

10.The Arg parameter is an information passed to the Screen that opens. This parameter was already defined as a pump's full name.

11.Change the Flags parameter to "1 + 2 + 64 + 2048", which means Title bar (1), Close button (2), Screen can be moved (64), and Centered Screen (2048).

Was this page useful?