Update cookies preferences
Promotic

Frame - property of the PmViewCreator object

Description:
Returns the PmMap object that contains parameters for the frame where the viewer will be displayed.
Syntax:
PmMap Frame
Note:
Property access for read only.
 
But it is possible to write into the properties of the PmMap object and it is also possible to add new properties of this object.

The parameters differ for various frame types. There are 3 frame types:
- separate window (target:_blank;)
- frame in the workspace (in the PmaWorkspace object)
- the PmgFrame object


The property returns PmMap object, that is filled from value of the sFramePars parameter (in the KeyVal format) in the Pm.CreateView method.
All initially set of the PmMap object properties are of the String type. The content of the PmMap object can be then modified as needed - items can be modified, added and deleted.
The PmMap object can also contain other embedded PmMap objects (Submap). The PmMap.mapSetSubmapAt method can be used in order to create a new PmMap or make one accessible.

Common parameters for all frame types:

target:xx; - Specifies in which frame will viewer be opened.
If not set, then the following settings are used as default:
- if the window is open as modal (is set "modal:1;"), then "_blank" is set.
- if is opened from the PmaPanel object, then "_self" is set.
- if is opened from the PmaWorkspace object, then the main frame identifier of the workspace is used (defined in the "Default frame" configurator).
- if is opened from the PmgFrame object, then the viewer displays in the PmgFrame object).
frameid - The new viewer is opened in the PmaWorkspace object in the frame with frameid identifier.
_self - The new viewer is opened in the current window (in the frame) and the viewer, over which the method was called, is closed.
_blank - The new viewer is opened in a new window.
_blank.blankid - Identifier of the independent or modal window.
If a window with blankid identifier already exists then the new viewer opens in current window, otherwise it opens in a new window.
 
The meaning of the identifier:
- Prevents opening a large number of windows with the same identifier.
- It allows this window to be referenced, for example:
- the method Pm.WndOper(0, "_blank.xy", 10) closes the window with xy identifier.
 
This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), spaces and first character must not be a number.
scrollbar:nn; - Specifies whether the window will have the scrollbars and allows moving the contents, if the panel size is greater than window size, the panel is inside.
0 - The scrollbars will never be displayed and therefore the window content cannot be scrolled.
It is handy for example for very narrow "toolbar" type windows.
1 (default) - The window displays the scrollbars and allows to scroll the panel, if the panel size is greater than window size, the panel is inside.
refresh:xx; - Only for opening the viewer of the PmaPanel object. Specifies whether the panel has the automatic refresh according to the globally set system period or the panel has its own refresh rate. For now, it is not functional when opening Web panel.
0 - The panel will have its own refresh, i.e. the PmaPanel.Refresh method will be called.
system (default) - The panel will have the automatic refresh according to the globally set system period (see the "PmaRoot > Application > Panels timer period" configurator).

Parameters only for a frame in a separate window:

modal:nn; - Specifies whether the window will be modal.
0 (default) - The window will not be modal.
1 - The window will be modal.
dependent:nn; - Specifies whether the window will be dependend on the application main window.
0 - The window will be independent on the application main window.
1 (default) - The window will be dependent on the application main window and will always be on top of the application.
caption:nn; - Specifies whether the window has the window title bar or not (i.e. the blue stripe on up).
0 - The window will have no title bar. For now, it is not functional when opening Web panel.
1 (default) - The window will have the title bar.
ontop:nn; - Specifies whether the window will be "Always on top".
0 (default) - The window will not be "Always on top".
1 - The window will be "Always on top". For now, it is not functional when opening Web panel.
state:xx; - Specifies the initial state of the window.
normal (default) - The window will be displayed normally (neither maximalized nor minimalized).
max - The window will be maximalized. For now, it is not functional when opening Web panel.
pos:xx; - Specifies the initial position of the window in normal state.
This position is just recommended. If the window size does not fit into the screen, then the position is shifted so the biggest possible portion of the window is visible.
top,center (default) - The window will be displayed in the center of the active application window (of the workspace).
top,x,y - The window will have the left upper corner in coordinates x and y (in pixels) relative to the active application window (of the workspace).
frame,center - The window will be displayed in the center of the window from which the new window was opened.
view,x,y - The window will have the left upper corner in coordinates x and y (in pixels) relative to content of the window from which it is opened.
The position is set as relative to window content (view) and not to the window itself (frame). This way it is possible for example to place the new window aside from the Pmg object the window was opened from. See Example for opening of the panel and placing according to the Pmg object position.
screen,x,y - The window will have the left upper corner in coordinates x and y (in pixels) in Windows absolute grid system. This option is not functional on the Web. It is used for positioning in main windows of the application (PmaWorkspace or PmaPanel) to individual displays. Other application windows are then usually positioned relatively to these main windows.
size:xx; - Specifies the initial size of the window in normal state.
content (default) - The window will be sized to fit the whole opened panel (i.e. no scrollbars are created).
Width and height of the panel is entered in the graphics editor in the PmgRoot object on the "Panel" tab.
The same function as the content value has the old (but still functional) value panel.
dx,dy - The window size will be defined by the dx and dy values (in pixels). These values define the outer window size (i.e. including the borders and window title bar).
fixed:xx,yy,..; - It allows to disable the change of state, position or panel size. It is defined as a list of prohibitions separated by "comma" (,). For now, it is not functional when opening Web panel. The default value is: Everything is enabled.
state - Disables to change the window state (normal / maximized / minimized).
pos - Disables to change the position of the window in normal state.
size - Disables to change the window size in normal state.
size2 - Disables changing window size in normal state - the window size cannot be greater than the size of corresponding panel.
See also:
- Pm.CreateView (method)
- PmViewCreator.View (property)
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(null, "/Web/Dir", "file:page.htm", "target:_blank;");
var oFrame = oCreator.Frame;
var sTarget = oFrame.target;   // Reading from the property. Return value is "_blank".
oFrame.size = "200,80";   // Writing into the property
oCreator.Open();

History:
Pm9.00.09: Created
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.