Programmer Guide/Shell Items/Display/SET DISPLAY: Difference between revisions
Line 107: | Line 107: | ||
Delete all popup menus and hide the menu bar. | Delete all popup menus and hide the menu bar. | ||
==Print== | |||
<code>SET <var>display</var> PRINT CLIPBOARD</code> | |||
Copy the display to the clipboard | |||
<code>SET <var>display</var> PRINT <var>filename</var></code> | |||
Save the display to the file <var>filename</var> | |||
<code>SET <var>display</var> PRINT PRINTER</code> | |||
Print the display | |||
Print or save all graphs contained in the display (this does not include the dialog). The options /Print and /Screen are used to select the color scheme. For file output, the file format is selected by the options /Enhancedmetafile (*.WMF), /Bitmap (*.BMP) or /pnG (*.PNG). Once started, the operation is performed in the background and a <code>STOP</code> message is sent when finished. |
Revision as of 17:59, 31 October 2012
This chapter documents the SET display
family of commands applicable to STx DISPLAY
items (i.e. shell items of type DISPLAY
).
SET display subcommand …
For a list of DISPLAY
item attributes, see DISPLAY Item Attributes. For a short first introduction into the matter of DISPLAY
items, see Introducing Display Items.
Contents
Graph Control
The following commands are used to set the height and width of the window in which a graph is displayed, as well as assigning the graph itself.
GRAPH
SET display GRAPH graphitemname
Activate a graph attached to the display. The activated graph gets the keyboard focus.
HEIGHT
SET display HEIGHT h1 [.. hNrows]
Set the height of all graph rows relative to one another. The height of the display window and of the dialog is not changed. E.g. SET display HEIGHT 1 1 2
sets the height of row three to the double of the height of rows one and two.
- hX
- The relative height of the row X (1 .. number of rows).
WIDTH
SET display WIDTH row|* left right
Set the width of the columns of the specified row (row ³ 0
) or all split rows (row = *
). The column splitter position is computed using:
pos = left / (left + right) . display_window_width.
- left
- The relative width of the left column (left >= 0).
- right
- The relative width of the right column (right >= 0).
Graph defaults
The following settings are not directly used by the display. They define the default settings for graphs which are created after the display. For a detailed description see the section SET GRAPH
. Only the argument title (of SET display TITLE
) is actually used by the display as the window caption (the text in the top left corner of the window).
SET display AXIS xLabel yLabel labelFont labelColor xTitle yTitle titleFont titleColor xUnit yUnit xBorder yBorder SET display FRAME xscale yscale scalecolor grid gridcolor xsteps ysteps major minor SET display MARKERS mode auto font color msfont mslincol msfillcol mstextcol SET display BGCOLOR text draw< SET display TITLE mode font color [title]
Popup Menus
ADDPOPUP
SET display ADDPOPUP title item1item2 … SET display ADDPOPUP title table /Table
Add a popup menu to the display. The popup menus are displayed in the menu bar of the window in the same order as the ADDPOPUP
commands are issued. Here is an example.
When a user selects an entry from one of these popups, the display item is sent a POPUP
message.
- title
- The menu title which is displayed in the menu bar of the display.
- itemX
- The menu items. itemX is used as the menu item capture unless the following applies:
- The string itemX is an asterisk - a menu separator is added rather than a caption.
- The string itemX begins with the character '
>
' (e.g.>text
) - A submenu is defined usingtext
as the caption.
The string itemX is the character '<
' - the last opened submenu is closed.
- If you want to display a hotkey in the menu item, add a tab and the hotkey to the item text, e.g. "Open [tab] Ctrl+O".
- table
- A simple table with one item per entry. See itemX for item details.
Separators or items which start or end a submenu are not counted in the menu item index computation!=====SETPOPUP=====
SET display SETPOPUP index1 [...] [/Enable|Disable /Check|Uncheck]
Activate|deactivate and/or set|clear the check status of menu items. The items may be located in different menus.
The index of menu items is used in the message handling and for the SETPOPUP
command. It is computed as follows:
index = menuIndex * 100 + itemindex
menuindex
|
index of menu (0, 1, ..; leftmost = 0) |
itemindex
|
index of item in addressed menu (0, 1, ..; topmost = 0); separators and submenu headers are not counted |
DELETEPOPUP
SET display DELPOPUP|DELETEPOPUP
Delete all popup menus and hide the menu bar.
SET display PRINT CLIPBOARD
Copy the display to the clipboard
SET display PRINT filename
Save the display to the file filename
SET display PRINT PRINTER
Print the display
Print or save all graphs contained in the display (this does not include the dialog). The options /Print and /Screen are used to select the color scheme. For file output, the file format is selected by the options /Enhancedmetafile (*.WMF), /Bitmap (*.BMP) or /pnG (*.PNG). Once started, the operation is performed in the background and a STOP
message is sent when finished.