Drawing environment
The work environment Draw provides all the tools for the construction of graphic displays for the application. You can start from empty displays and create objects, or you can embed ready-made objects with various visualization or action dynamics.
Drawing
To enter this environment click the Draw (Draw)
In Action.NET the environment Draw has three tabs:
Drawing where the displays are shown and can be edited. In the Drawing tab, there is a vertical toolbar on the left side of the desktop and a horizontal bar at the bottom of the same area, oriented to tasks on the objects within a display.
CodeBehind for writing display-related Scripts. In this tab there is a Source Code Editor and already appear the texts of the prototypes of the procedures that are activated by basic events on displays. If necessary, these texts must be filled with codes to modify the standard display procedure.
Symbols with the library of graphic symbols available in the project. In this grid you can edit symbol attributes. To create a symbol, right-click on an object on a display.
Displays Code Behind
Use the tab CodeBehind to define a set of display-related functions. You can write code in both VB.Net and CSharp. You can also switch between the two. If you change the language selection, the system automatically converts the existing code to the corresponding one in the selected language.
If you need references to other pieces of code also created by you, use Run > Build > References to establish these references.
The functions placed in CodeBehind can be performed when opening or closing a display, or when the display is already open, depending on how you configure the code. You can use CodeBehind to define methods of handling mouse clicks on the display or input commands to run on specific displays.
For Dialog displays, use the predefined method DialogOnOK, which is called when the OK, also predefined in the dialog box, is pressed. If this method returns True, the dialog closes if it returns False, the dialogue remains open. This method is commonly used to ensure data validation in the dialog box (which should then prompt the user to correct incorrect entries before closing the dialog).
The code behind the displays has the following predefined methods:
DisplayOpening() - Executed when the screen is opening.
DisplayIsOpen() - Called at regular intervals of time while screen is open
DisplayClosing() - Executed when the screen is closing.
DialogOnOK() - Called when the OK button of a dialog screen is pressed:
Returning 1 allows the dialog to be closed by the system.
Returning 0 prevents the dialog from being closed.
You can add your own variables and other DOT NET methods in this code text.
NOTE - Because Client displays are designed to work in distributed and web environments, we recommend avoiding the use of functions that do not allow "partial trust" execution, or that refer to physical file paths.
Drawing tools
The tab Drawing you have the following toolbars and controls to create, format, and configure displays:
Vertical Bar - On the left side of the Drawing tab. Use these buttons to draw shapes, add buttons, and create special windows. For details on these buttons, see Table 1.
Horizontal Bar - At the bottom of the Drawing tab. Use these buttons to group, combine, align, and pin selected objects. For more information, see Table 2.
Appearance, Dynamics, DisplaySettings and other settings - In the left panel of the tab, below the main menu buttons. These settings vary depending on the characteristics and functionality of the selected object type.
Drawing - Vertical Toolbar
The following table displays the Vertical toolbar icons of the Drawing space and their features.
Button | Description |
Selection Tool |
|
Direct Selection Tool |
|
Hand Tool | Use the Hand tool to modify the preview window by clicking on the bottom of the display and holding down the left mouse button then changing the display to the desired position. |
Geometric objects tools | Use the right mouse button to end the use of each |
| Creates a rectangle object. |
| Creates an ellipse object. |
| Creates a polygon object. |
Polyline | Creates a polyline object. |
Button | Creates a button object. |
| Creates a text output object. |
Text Box | Creates a text input/output object. |
CheckBox | Creates a "check box" object. By right-clicking the mouse button, you have access to the creation of the following other objects: Creates a password object. |
Insert Symbol | Clicking this button shows the Symbol Library that includes both pre-defined and user-defined symbols. |
Symbol Factory | Opens the Symbol Factory app to obtain ready-made, vector symbols in wide variety. |
Image Resource | Opens the image library window (resources) to get images from them for use on the display. |
Web Browser | Creates a Web Browser object. By right-clicking the mouse button, you have access to the creation of the following other objects: |
Alarm Window | Creates an Alarm Window object. Position the alarm window on the display and double-click on it to configure its parameters. For more information see "Setting up a Alarm Window" Also available is the icon for creating an AlarmArea object. |
Trend Window | Creates a Trend Window object. Position the trend window on the display and double-click on it to set up its parameters. For more information see "Setting up the Trend Window (Legacy)" |
DataGrid Window | Creates a DataGrid window object. Position the DataGrid window on the display double-click on it to configure its parameters. For more information see "Setting up a DataGrid Window" |
Drawing - Horizontal Toolbar
The following table displays the horizontal toolbar icons of the Drawing space and its functionality.