(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: KEYCODE_TO_NAME, next: NEXT)


LABEL_BORDER - Label a Virtual Display Border

Supply a label for a virtual display's border.

Format:

    None = vms_smg.label_border (display_id,        \
           [text], [position_code], [units],        \
           [rendition-set], [rendition-complement], \
           [character-set])
Returns:

None

Arguments:

display_id
Virtual display to be labeled.
text
The new label for this display's border.
position_code
Specifies which of the display's borders contains the label. Constants like SMG_K_TOP are in module 'vms_smgdef'.
units
Specifies the character position at which the label begins within the border. If omitted (None), the label is centered in the specified border.
rendition_set
Attribute specifier. Bit mask values like SMG_M_BOLD are in module 'vms_smgdef'.
rendition_complement
Attribute complement specifier. There are no symbolic names available - please see the OpenVMS documentation for details.
character_set
The default character set for all text. Constants like SMG_C_ASCII are in module 'vms_smgdef'.
Examples:
>>> import vms_smg
>>> import vms_smgdef

>>> # create a new DECwindows terminal using SMG
>>> status, pasteboard_id, number_of_pasteboard_rows, \
... number_of_pasteboard_columns, type_of_terminal,   \
... device_name = vms_smg.create_pasteboard           \
...   (None, vms_smgdef.SMG_M_WORKSTATION)
>>>

>>> # create virtual display 1
>>> status, vtdpy1 = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

>>> # write to virtual display 1
>>> status = vms_smg.put_chars (vtdpy1, 'V1', 0, 0)
>>>

>>> # create virtual display 2
>>> status, vtdpy2 = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

>>> # write to virtual display 2
>>> status = vms_smg.put_chars (vtdpy2, 'V2', 0, 0)
>>>

>>> # paste virtual display 1
>>> status = vms_smg.paste_virtual_display \
...          (vtdpy1, pasteboard_id, 3, 5, None)
>>>

>>> # paste virtual display 2
>>> status = vms_smg.paste_virtual_display \
...          (vtdpy2, pasteboard_id, 5, 7, None)
>>>

Screen layout, file: VMS_SMG_003.JPG

(picture VMS_SMG_003.JPG)

>>> # label virtual display 1
>>> vms_smg.label_border (vtdpy1, 'VTDPY1')
>>>

(Notice that the cursor of this display became visible)

>>> # label virtual display 2
>>> vms_smg.label_border (vtdpy2, 'DPY2', vms_smgdef.SMG_K_RIGHT)
>>>

(Notice that the cursor of this display became visible, again)

Screen layout, file: VMS_SMG_030.JPG

(picture VMS_SMG_030.JPG)

Puzzled why display 2 is not labeled 'VTDPY2'?
--> The name is too long for the right border!

>>> vms_smg.label_border (vtdpy2, 'VTDPY2', vms_smgdef.SMG_K_RIGHT)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_smg.error: (1212940, '%SMG-F-INVARG, invalid argument')
>>>

(go to: table of contents, index, list of vms_smg, prev: KEYCODE_TO_NAME, next: NEXT)

10-SEP-2000 ZE.