ActiveTcl User Guide
|
||
widget iwidgets::messagebox pathName ?options? itk::Widget <- iwidgets::Labeledwidget <- iwidgets::Scrolledwidget <- iwid- gets::Messagebox
activeBackground activeForeground background borderWidth
tions.
labelBitmap labelFont labelImage
labelMargin
above associated options.
activeRelief elementBorderWidth
jumptroughColor
associated options.
above associated options.
spacing1 spacing2 spacing3
ciated options.
log when it pops up during a save of the messagebox contents op-
eration.
the messagebox. When this limit is reached, the oldest line will be deleted such that the total number of lines remains maxlines.
tion dialog pops up during a save of the messagebox contents op-
eration. If this parameter is not specified, then the files in the
current working directory are displayed.
_________________________________________________________________
messages area widget. Message types can be user defined and con- figured. Their options include foreground, background, font, bell, and their display mode of on or off. This allows message types to defined as needed, removed when no longer so, and modi- fied when necessary. An export method is provided for file I/O.
ing 1000. When this limit is reached, the oldest line is removed.
pressed in the message area has been predefined. The contents of the popup menu by default support clearing the area and saving its contents to a file. Additional operations may be defined or existing operations removed by using the component command to ac- cess the popup menu. they may be added, removed, and configured. The options of the message type control the display include the following: -back*- ground color Color specifies the background color to use for characters associated with the message type. It may have any of the forms accepted by Tk_GetColor. -bell boolean Specifies whether or not to ring the bell whenenver a message of this type is issued. Boolean may have any of the forms accepted by Tk_Get*-
of a font to use for drawing characters. It may have any of the forms accepted by Tk_GetFontStruct. -foreground color Color specifies the foreground color to use for characters associated with the message type. It may have any of the forms accepted by
this message type when issued. Boolean may have any of the forms accepted by Tk_GetBoolean. The default is 1.
name is pathName. This command may be used to invoke various op- erations on the widget. It has the following general form:
pathName option ?arg arg ...?
pathName cget option Returns the current value of the configura- tion option given by option. Option may have any of the values accepted by the iwidgets::messagebox command. pathName clear
placed with text widget contents. pathName configure ?option? ?value option value ...? Query or modify the configuration op- tions of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_Con*- figureInfo for information on the format of this list). If op- tion is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwid*- gets::messagebox command. pathName type option msgtype ?arg arg ...? This command is used to manipulate message types. The behavior of the command depends on the option argument that fol- lows the type keyword. The following forms of the command are supported: pathName type add msgtype ?option value ...? Adds a new message type given by msgtype with the display properties de- fined by the option value pairs. See MESSAGE TYPES for informa- tion on the options that are supported. pathName type cget msg- type option Returns the value of a configuration option for a message type. Msgtype identifies the message type, and option specifies a particular configuration option, which must be one of the ones listed in the section MESSAGE TYPES. pathName type con*- figure msgtype ?option value ...? Query or modify the configura- tion options for a message type. If no option is specified, re- turns a list describing all of the available options for the mes- sage type msgtype. If option is specified with no value, then the command returns a list describing the one named option. If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. See MESSAGE TYPES for information on the options that are supported. pathName type re*- move msgtype Removes an existing message type given by msgtype. pathName issue string ?level? ?tags? Print a string to the text area at the given level and with any additional tags specified.
in the text area of the messagebox. Its contents may be modified
via the component command.
scrolledtext widget manual entry for details on the text compo- nent item.
package require Iwidgets 4.0
iwidgets::messagebox .mb -hscrollmode dynamic \ -labeltext
Messages -labelpos n \
-height 120 -width 550 -savedir /tmp -textbackground #d9d9d9
pack .mb -padx 5 -pady 5 -fill both -expand yes
.mb type add ERROR -background red -foreground white -bell 1 .mb type add WARNING -background yellow -foreground black .mb type add INFO -background white -foreground black
.mb issue This is an error message in red with a beep ERROR .mb issue This warning message in yellow WARNING .mb issue This is an informational message INFO