Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The Display namespace lists all the displays with their properties and their open and close methods.

On this page:

Table of Contents
maxLevel3


About the Display Namespaces

The Layout namespace lists all the layouts with their properties and their open and close methods.

The Client namespace contains the properties of the environment on each connected client computer or mobile device.

See Namespaces for the complete programming reference on runtime objects.

When accessing a project object in the .NET Script Editor, it is necessary to prefix the namespace with an at ‘@’ symbol in order to avoid conflict with the .NET local variables names.





Display Opening Methods

There are many ways to open a new Display or Popup. For each method, specific characteristics must be considered. Below you will find every method for opening a new Display with some description on their behavior and how to use them.

Display.DisplayName.Open

  • Begins Open Display process
  • Returns a flag (true or false) indicating success or fail
  • Uses the following syntax:
Code Block
@Display.<DisplayName>.Open();
E.g.:
@Display.MainPage.Open();

Display.DisplayName.OpenModal

  • Opens Display as Modal
  • Not available for Mono and HTML5
  • Returns a flag (true or false) indicating success or fail
  • Uses the following syntax:
Code Block
@Display.<DisplayName>.OpenModal();E.g.:@Display.MainPage.OpenModal();

 Display.DisplayName.NewPopup

  • Opens a new popup. If the Display is already open, a new instance will open
  • Always returns an empty string, independent if it succeeds or fails
  • Uses the following syntax:
Code Block
@Display.<DisplayName>.NewPopup(LabelList[label1=tag1;label2=tag2],Left,Top, Width,Height);
E.g.:
@Display.MyPopup.NewPopup("PID=PID1;NAME=’PID  1’");

Client.OpenDisplay

  • Opens a Display
  • Returns a flag (true or false) indicating success or fail
  • Uses the following syntax:
Code Block
@Display.OpenDisplay("DisplayName");@Display.OpenDisplay("About");

Client.OpenDisplayAtIndex

  • Opens Display at x-order list of displays. Current Display is closed

  • Returns a flag (true or false) indicating success or fail
  • Uses the following syntax:
Code Block
@Client.OpenDisplayAtIndex(string DisplayName,int index);E.g.:@Client.OpenDisplayAtIndex("MainPage",0);

Client.NewPopup

  • Opens a new popup. If the Display is already open, a new instance will open
  • Always returns an empty string, independent if it succeeds or fails
  • Uses the following syntax:
Code Block
@Client.NewPopup(string DisplayName, LabelList[label1=tag1;label2=tag2],Left, Top,Width,Height);E.g.:
@Client.NewPopup("PopupPID","PID=PID1;NAME=’PID 1’");




Methods

Close()

  • Begins close display
  • Returns a flag indicating success (true) or fail (false)
Code Block
titleExample
bool sts = @Display.About.Close();

GetCustomPropertiesAsString(string sep)

  • Gets all custom properties
  • Default Separator is a comma ‘,
  • Returns a string
Code Block
titleExample
string msg = @Display.About.GetCustomPropertiesAsString(",");

GetCustomPropertyValue(string PropertyName,string defaultValue):

  • Gets value of custom property name
  • propertyName: Property Name
  • defaultValue: Default value if property could not be found
  • Returns property value
Code Block
titleExample
@Display.MainPage.GetCustomPropertyValue("p1","-1")

NewPopup(object[] items):

  • Opens a new popup. If the Display is already open, a new instance will open
  • Always returns an empty string, independent if it succeeds or fails
Code Block
titleExample
@Display.MyPopup.NewPopup("Max=MaxValue;Min=MinValue");

Open()

  • Begins open display
  • Returns a flag indicating success (true) or fail (false)
Code Block
titleExample
bool sts = @Display.About.Open();

OpenModal()

  • Opens Display as modal
  • Disabled for Mono and HTML5
  • Returns a boolean indicating success (true) or fail (false)
Code Block
titleExample
bool sts = @Display.MainPage.OpenModal();

PrintDisplay(bool defaultPrinter)

  • Begins print display
  • Returns a boolean indicating success (true) or fail (false)
  • defaultPrinter: flag indicating whether default printer must be used or not
Code Block
titleExample
bool sts = @Display.MainPage.PrintDisplay(true);
  • If the default printer is set to false, a popup window will appear.

PrintDisplayDefaultPrinter(int PageOrientation) :

  • Begins print display using default printer
  • PageOrientation: 0 for Portrait and 1 for Landscape
  • Returns a flag indicating success (true) or fail (false)
Code Block
titleExample
bool sts = @Display.MainPage.PrintDisplayDefaultPrinter(0);

RemoveAllCustomProperties():

  • Removes all custom properties
  • Returns always Not used
Code Block
titleExample
@Display.LogOn.RemoveAllCustomProperties();

SetCustomProperties(string str, string sep)

  • Sets custom property. If property does not exist, it is created.
  • propertyName: Property Name. If the name starts with an at ‘@’ symbol and the rest of the string is a valid tag name, the property is a reference to the Tag Value.
  • propertyValue: Property value
  • Returns always Not used
Code Block
titleExample
@Display.MainPage.SetCustomProperties("p1=10;p2=20",  ";")

SetCustomPropertyValue(string propertyName, object propertyValue)

  • Sets custom property. If the property does not exist, it is created.
  • propertyName: Property Name. If the name starts with an at ‘@’ symbol and the rest of the string is a valid tag name, the property is a reference to the Tag Value.
  • propertyValue: Property value.
  • Returns always Not used.
Code Block
titleExample
@Display.MainPage.SetCustomPropertyValue("p1",  50")



Properties

Category: ReadOnly property with categories that are configured for the Display Object in Run → Dictionaries → Project Settings → Categories. Used for organization purposes.

Description: Description of the display, configured in Edit →  Displays → DisplaysList.

HorizontalScroll: Indicates the horizontal scroll value.


Id Object: Object ID (Internal Use). Can be found at Edit → Displays → Displays List.


IsOpened: Indicates if the selected display is opened.

    • Returns false if is not opened
    • Returns true if is opened

Level: ReadOnly property with levels configured for the Display Object on Edit → Tags → Assets Unified Namespace → Asset Tree.

VerticalScroll: Indicates the vertical scroll value.

ZoomLevel: Indicates the zoom level of the page. One is the normal zoom level. The images below show the difference between zoom level 1 and 2. 



In this section...

Page Tree
root@parent
spacesV10