3.34 message%
Implements: control<%>
A message control is a static line of text or a static bitmap. The
text or bitmap corresponds to the message's label (see
set-label).
(->newmessage% (label_) (parent_) [(style_)] [(font_)] [(enabled_)] [(vert-margin_)] [(horiz-margin_)] [(min-width_)] [(min-height_)] [(stretchable-width_)] [(stretchable-height_)])message%object
label: string (up to 200 characters),bitmap%object,'app,'caution, or'stop
parent:frame%,dialog%,panel%, orpane%object
style=null: list of symbols in'(deleted)
font=:normal-control-fontfont%object
enabled=#t: boolean
vert-margin=2: exact integer in [0, 1000]
horiz-margin=2: exact integer in [0, 1000]
min-width=graphical minimum width: exact integer in [0, 10000]
min-height=graphical minimum height: exact integer in [0, 10000]
stretchable-width=#f: boolean
stretchable-height=#f: booleanCreates a string or bitmap message initially showing
label. Iflabelis a bitmap, then the bitmap must be valid (seeok?inbitmap%) and not installed in abitmap-dc%object; otherwise, anexn:fail:contractexception is raised. If the bitmap has a mask (seeget-loaded-maskinbitmap%) that is the same size as the bitmap, then the mask is used for the label; furthermore, in contrast to the limitations ofdraw-bitmapindc<%>, non-monochrome label masks work consistently on all platforms. An'app,'caution, or'stopsymbol forlabelindicates an icon;'appis the application icon (Windows and Mac OS X) or a generic ``info'' icon (X),'cautionis a caution-sign icon, and'stopa stop-sign icon.If an ampersand (``&'') occurs in
label, it is specially parsed; under Windows and X, the character following an ampersand is underlined in the displayed control to indicate a keyboard mnemonic. (Under Mac OS X, mnemonic underlines are not shown.) The mnemonic is meaningless for a message (as far ason-traverse-charis concerned), but it is supported for consistency with other control types. A programmer may assign a meaning to the mnemonic, e.g., by overridingon-traverse-char.If
styleincludes'deleted, then the message is created as hidden, and it does not affect its parent's geometry; the message can be made active later by callingparent'sadd-childmethod.The
fontargument determines the font for the control. For information about theenabledargument, seewindow<%>. For information about thehoriz-marginandvert-marginarguments, seesubarea<%>. For information about themin-width,min-height,stretchable-width, andstretchable-heightarguments, seearea<%>.
Methods
set-label
All Methods
accept-drop-files from window<%>
client->screen from window<%>
command from control<%>
enable from window<%>
focus from window<%>
get-client-size from window<%>
get-cursor from window<%>
get-font from control<%>
get-graphical-min-size from area<%>
get-handle from window<%>
get-height from window<%>
get-label from window<%>
get-parent from area<%>
get-plain-label from window<%>
get-size from window<%>
get-top-level-window from area<%>
get-width from window<%>
get-x from window<%>
get-y from window<%>
has-focus? from window<%>
horiz-margin from subarea<%>
is-enabled? from window<%>
is-shown? from window<%>
min-height from area<%>
min-width from area<%>
on-drop-file from window<%>
on-focus from window<%>
on-move from window<%>
on-size from window<%>
on-subwindow-char from window<%>
on-subwindow-event from window<%>
on-superwindow-enable from window<%>
on-superwindow-show from window<%>
popup-menu from window<%>
refresh from window<%>
screen->client from window<%>
set-cursor from window<%>
set-label from message%
overrides set-label from window<%>
show from window<%>
stretchable-height from area<%>
stretchable-width from area<%>
vert-margin from subarea<%>