METAFILE
A METAFILE control merely displays an METAFILE image (ie, some graphic stored in a meta file format).
Uses
Can be used for decoration or display some visual information such as a picture.
Styles
A METAFILE may have any, all, or none of the following styles:
NOTIFY | Causes the Window Layout's DBLCLK or CLICK subroutines for this control to be called when the mouse is double-clicked or clicked on the image. |
SUNKEN | Creates a border with a sunken edge around the picture. |
FILL | If the image is smaller than the METAFILE area, the rest of the area is filled with the color of the pixel in the top left corner of the image. |
FIXRIGHT | The lower right corner of the METAFILE is to remain fixed when the control is resized. Only the top and left sides are adjusted to accommodate a new image loaded into the area. |
FIXSIZE | The METAFILE (area) is not resized to fit the real size of the image. If the image is larger than the METAFILE area, the image is clipped to fit the original METAFILE area. |
NOSIBLING | Prevents this control from drawing into any overlapping controls. |
GROUP | Marks this control as the first of a group of controls in which the user can move from one control to the next with the arrow keys. All subsequent controls (after this first control) belong to the same group up to the next control that has its GROUP flag set. (ie, One group ends where the next begins). |
DISABLED | Control is initially disabled. You can later enable it with a call to GuiSetCtlPlacement. |
HIDE | Control is hidden. You can later make it visible with a call to GuiSetCtlPlacement. |
BORDER | Creates a border around the picture. |
Extra styles
A METAFILE can have the following extra styles:
MODALFRAME | Has a double border. |
STATICEDGE | Has a three-dimensional border intended to be used for controls that do not accept user input. |
CLIENTEDGE | Has a 3D look comprised of a border with a sunken edge. |
FILES | Accepts drag-and-drop files (ie, the DROPFILES event). |
TRANSPARENT | The control is to be transparent. Any controls that are beneath this one are not obscured. |
Events
A METAFILE generates the following events:
Event name When it occurs CLICK The user has clicked on the image. Note: A disabled METAFILE does not cause a CLICK event. This event also does not occur if the NOTIFY style is not specified for the control. DBLCLK The user has double-clicked on the image. Note: A disabled METAFILE does not cause a DBLCLK event. This event also does not occur if the NOTIFY style is not specified for the control.
REXX Variable
A METAFILE must have a REXX variable associated with it only if you specify the NOTIFY style, or you wish to be able to change its state (with GuiSetCtlPlacement) or image. You do not need to initialize the variable before opening the window which contains the METAFILE control.