Indexed Screen

<< Click to Display Table of Contents >>

 

Indexed Screen

It is very common to have Screens that repeat themselves in an application. Instead of creating several Screens, let's create only one and configure from where to retrieve its data. For this type of Screen, let's call it an Indexed Screen.

1.Create a Screen called "CommandScreen", sized with 300 by 300 pixels.

2.Insert an XC_Command XControl on this Screen.

3.To open the configuration Screen when clicking a pump, in the XC_Pump XControl insert the next script on the Click event of the object representing a pump.

Arg = XC_Pump.Source.PathName
Set newScreen = Application.GetFrame("virtualFrame")
newScreen.MoveFrame , , 200, 250
newScreen.SetFrameOptions XC_Pump.Source.Name, 1 + 2 + 16 + 64 + 2048
Set screenObj = Application.GetScreen("CommandScreen")
newScreen.ShowScreen screenObj, 100, 0
screenObj.Item("XC_Command1").Source = Arg

 

NOTE

The GetFrame method allows opening a Screen in pop-up format, defining its size by using the MoveFrame method. The GetScreen method, on the other hand, allows defining a Screen to open and its data source, that is, an instance of an XO_Pump XObject.

 

4.Save the application and test this new functionality.

Was this page useful?