ScrollingMessageFrame expands on MessageFrame with the ability to store a much longer series of messages, and to move up and down through them by setting horizontal and vertical scroll values, or by using PageUp and PageDown methods.
ScrollingMessageFrames also support hyperlinks—such as the links posted in trade chat by people with items they want to sell—and provides an OnHyperlinkClicked script for displaying information related to the contents of the link.
The most common ScrollingMessageFrame in the stock UI is simply the chat frame, as well as the combat log. The raid warning and boss emote messages are presented in a ScrollingMessageFrame. The Guild Bank UI also uses one to display the transaction history.
Defined Methods
- ScrollingMessageFrame:AddMessage("text" [, red [, green [, blue [, lineID [, addToTop [, accessID [, extraData]]]]]]]) - Adds a message to those listed in the frame
- atBottom = ScrollingMessageFrame:AtBottom() - Returns whether the message frame is currently scrolled to the bottom of its contents
- atTop = ScrollingMessageFrame:AtTop() - Returns whether the message frame is currently scrolled to the top of its contents
- ScrollingMessageFrame:Clear() - Removes all messages stored or displayed in the frame
- lineNum = ScrollingMessageFrame:GetCurrentLine() - Returns a number identifying the last message added to the frame
- offset = ScrollingMessageFrame:GetCurrentScroll() - Returns the message frame's current scroll position
- duration = ScrollingMessageFrame:GetFadeDuration() - Returns the duration of the fade-out animation for disappearing messages
- fading = ScrollingMessageFrame:GetFading() - Returns whether messages added to the frame automatically fade out after a period of time
- enabled = ScrollingMessageFrame:GetHyperlinksEnabled() - Returns whether hyperlinks in the frame's text are interactive
- indent = ScrollingMessageFrame:GetIndentedWordWrap() - Returns whether long lines of text are indented when wrapping
- position = ScrollingMessageFrame:GetInsertMode() - Returns the position at which new messages are added to the frame
- ScrollingMessageFrame:GetMaxLines(maxLines) - Returns the maximum number of messages kept in the frame
- text, accessID, lineID, extraData = ScrollingMessageFrame:GetMessageInfo(index [, accessID]) - Return information about a previously added chat message.
- count = ScrollingMessageFrame:GetNumLinesDisplayed() - Returns the number of lines displayed in the message frame
- count = ScrollingMessageFrame:GetNumMessages([accessID]) - Returns the number of messages currently kept in the frame's message history
- time = ScrollingMessageFrame:GetTimeVisible() - Returns the amount of time for which a message remains visible before beginning to fade out
- ScrollingMessageFrame:PageDown() - Scrolls the message frame's contents down by one page
- ScrollingMessageFrame:PageUp() - Scrolls the message frame's contents up by one page
- ScrollingMessageFrame:RemoveMessagesByAccessID() - This function is not yet documented
- ScrollingMessageFrame:RemoveMessagesByExtraData() - This function is not yet documented
- ScrollingMessageFrame:ScrollDown() - Scrolls the message frame's contents down by two lines
- ScrollingMessageFrame:ScrollToBottom() - Scrolls to the bottom of the message frame's contents
- ScrollingMessageFrame:ScrollToTop() - Scrolls to the top of the message frame's contents
- ScrollingMessageFrame:ScrollUp() - Scrolls the message frame's contents up by two lines
- ScrollingMessageFrame:SetFadeDuration(duration) - Sets the duration of the fade-out animation for disappearing messages
- ScrollingMessageFrame:SetFading(fading) - Sets whether messages added to the frame automatically fade out after a period of time
- ScrollingMessageFrame:SetHyperlinksEnabled(enable) - Enables or disables hyperlink interactivity in the frame
- ScrollingMessageFrame:SetIndentedWordWrap(indent) - Sets whether long lines of text are indented when wrapping
- ScrollingMessageFrame:SetInsertMode("position") - Sets the position at which new messages are added to the frame
- ScrollingMessageFrame:SetMaxLines(maxLines) - Sets the maximum number of messages to be kept in the frame
- ScrollingMessageFrame:SetScrollOffset(offset) - Sets the message frame's scroll position
- ScrollingMessageFrame:SetTimeVisible(time) - Sets the amount of time for which a message remains visible before beginning to fade out
- ScrollingMessageFrame:UpdateColorByID(id, red, green, blue) - Updates the color of a set of messages already added to the frame
Inherited Methods
- ScrollingMessageFrame:AllowAttributeChanges() - Temporarily allows insecure code to modify the frame's attributes during combat
- enabled = ScrollingMessageFrame:CanChangeAttribute() - Returns whether secure frame attributes can currently be changed
- canChange = ScrollingMessageFrame:CanChangeProtectedState() - Returns whether protected properties of the region can be changed by non-secure scripts
- ScrollingMessageFrame:ClearAllPoints() - Removes all anchor points from the region
- animationGroup = ScrollingMessageFrame:CreateAnimationGroup(["name" [, "inheritsFrom"]]) - Creates a new AnimationGroup as a child of the region
- fontstring = ScrollingMessageFrame:CreateFontString(["name" [, "layer" [, "inherits"]]]) - Creates a new [[docs/widgets/FontString|`FontString`]] as a child of the frame
- texture = ScrollingMessageFrame:CreateTexture(["name" [, "layer" [, "inherits" [, sublevel]]]]) - Creates a new [[docs/widgets/Texture|`Texture`]] as a child of the frame
- region = ScrollingMessageFrame:CreateTitleRegion() - Creates a title region for dragging the frame
- ScrollingMessageFrame:DisableDrawLayer("layer") - Prevents display of all child objects of the frame on a specified graphics layer
- ScrollingMessageFrame:EnableDrawLayer("layer") - Allows display of all child objects of the frame on a specified graphics layer
- ScrollingMessageFrame:EnableJoystick(enable) - Enables or disables joystick interactivity
- ScrollingMessageFrame:EnableKeyboard(enable) - Enables or disables keyboard interactivity for the frame
- ScrollingMessageFrame:EnableMouse(enable) - Enables or disables mouse interactivity for the frame
- ScrollingMessageFrame:EnableMouseWheel(enable) - Enables or disables mouse wheel interactivity for the frame
- alpha = ScrollingMessageFrame:GetAlpha() - Returns the opacity of the region relative to its parent
- ... = ScrollingMessageFrame:GetAnimationGroups() - Returns a list of animation groups belonging to the region
- value = ScrollingMessageFrame:GetAttribute("name") - Returns the value of a secure frame attribute
- backdrop = ScrollingMessageFrame:GetBackdrop() - Returns information about the frame's backdrop graphic
- red, green, blue, alpha = ScrollingMessageFrame:GetBackdropBorderColor() - Returns the shading color for the frame's border graphic
- red, green, blue, alpha = ScrollingMessageFrame:GetBackdropColor() - Returns the shading color for the frame's background graphic
- bottom = ScrollingMessageFrame:GetBottom() - Returns the distance from the bottom of the screen to the bottom of the region
- left, bottom, width, height = ScrollingMessageFrame:GetBoundsRect() - Returns the position and dimension of the smallest area enclosing the frame and its children
- x, y = ScrollingMessageFrame:GetCenter() - Returns the screen coordinates of the region's center
- ... = ScrollingMessageFrame:GetChildren() - Returns a list of child frames of the frame
- left, right, top, bottom = ScrollingMessageFrame:GetClampRectInsets() - Returns offsets from the frame's edges used when limiting user movement or resizing of the frame
- depth = ScrollingMessageFrame:GetDepth() - Returns the 3D depth of the frame (for stereoscopic 3D setups)
- ScrollingMessageFrame:GetDontSavePosition() - This function is not yet documented
- alpha = ScrollingMessageFrame:GetEffectiveAlpha() - Returns the overall opacity of the frame
- depth = ScrollingMessageFrame:GetEffectiveDepth() - Returns the overall 3D depth of the frame (for stereoscopic 3D configurations)
- scale = ScrollingMessageFrame:GetEffectiveScale() - Returns the overall scale factor of the frame
- filename, fontHeight, flags = ScrollingMessageFrame:GetFont() - Returns the font instance's basic font properties
- font = ScrollingMessageFrame:GetFontObject() - Returns the `Font` object from which the font instance's properties are inherited
- level = ScrollingMessageFrame:GetFrameLevel() - Sets the level at which the frame is layered relative to others in its strata
- strata = ScrollingMessageFrame:GetFrameStrata() - Returns the general layering strata of the frame
- height = ScrollingMessageFrame:GetHeight() - Returns the height of the region
- left, right, top, bottom = ScrollingMessageFrame:GetHitRectInsets() - Returns the insets from the frame's edges which determine its mouse-interactable area
- id = ScrollingMessageFrame:GetID() - Returns the frame's numeric identifier
- justify = ScrollingMessageFrame:GetJustifyH() - Returns the font instance's horizontal text alignment style
- justify = ScrollingMessageFrame:GetJustifyV() - Returns the font instance's vertical text alignment style
- left = ScrollingMessageFrame:GetLeft() - Returns the distance from the left edge of the screen to the left edge of the region
- maxWidth, maxHeight = ScrollingMessageFrame:GetMaxResize() - Returns the maximum size of the frame for user resizing
- minWidth, minHeight = ScrollingMessageFrame:GetMinResize() - Returns the minimum size of the frame for user resizing
- name = ScrollingMessageFrame:GetName() - Returns the widget object's name
- numChildren = ScrollingMessageFrame:GetNumChildren() - Returns the number of child frames belonging to the frame
- numPoints = ScrollingMessageFrame:GetNumPoints() - Returns the number of anchor points defined for the region
- numRegions = ScrollingMessageFrame:GetNumRegions() - Returns the number of non-Frame child regions belonging to the frame
- type = ScrollingMessageFrame:GetObjectType() - Returns the object's widget type
- parent = ScrollingMessageFrame:GetParent() - Returns the object's parent object
- point, relativeTo, relativePoint, xOffset, yOffset = ScrollingMessageFrame:GetPoint(index) - Returns information about one of the region's anchor points
- ScrollingMessageFrame:GetPropagateKeyboardInput() - This function is not yet documented
- left, bottom, width, height = ScrollingMessageFrame:GetRect() - Returns the position and dimensions of the region
- ... = ScrollingMessageFrame:GetRegions() - Returns a list of non-Frame child regions belonging to the frame
- right = ScrollingMessageFrame:GetRight() - Returns the distance from the left edge of the screen to the right edge of the region
- scale = ScrollingMessageFrame:GetScale() - Returns the frame's scale factor
- handler = ScrollingMessageFrame:GetScript("scriptType") - Returns the widget's handler function for a script
- shadowR, shadowG, shadowB, shadowAlpha = ScrollingMessageFrame:GetShadowColor() - Returns the color of the font's text shadow
- xOffset, yOffset = ScrollingMessageFrame:GetShadowOffset() - Returns the offset of the font instance's text shadow from its text
- width, height = ScrollingMessageFrame:GetSize() - Returns the width and height of the region
- spacing = ScrollingMessageFrame:GetSpacing() - Returns the font instance's amount of spacing between lines
- textR, textG, textB, textAlpha = ScrollingMessageFrame:GetTextColor() - Returns the font instance's default text color
- region = ScrollingMessageFrame:GetTitleRegion() - Returns the frame's TitleRegion object
- top = ScrollingMessageFrame:GetTop() - Returns the distance from the bottom of the screen to the top of the region
- width = ScrollingMessageFrame:GetWidth() - Returns the width of the region
- hasScript = ScrollingMessageFrame:HasScript("scriptType") - Returns whether the widget supports a script handler
- ScrollingMessageFrame:Hide() - Hides the region
- ScrollingMessageFrame:HookScript("scriptType", handler) - Securely hooks a script handler
- ScrollingMessageFrame:IgnoreDepth(enable) - Sets whether the frame's depth property is ignored (for stereoscopic 3D setups)
- enabled = ScrollingMessageFrame:IsClampedToScreen() - Returns whether the frame's boundaries are limited to those of the screen
- isDragging = ScrollingMessageFrame:IsDragging() - Returns whether the region is currently being dragged
- registered = ScrollingMessageFrame:IsEventRegistered("event") - Returns whether the frame is registered for a given [[docs/events|event]]
- enabled = ScrollingMessageFrame:IsIgnoringDepth() - Returns whether the frame's depth property is ignored (for stereoscopic 3D setups)
- enabled = ScrollingMessageFrame:IsJoystickEnabled() - Returns whether joystick interactivity is enabled for the frame
- enabled = ScrollingMessageFrame:IsKeyboardEnabled() - Returns whether keyboard interactivity is enabled for the frame
- enabled = ScrollingMessageFrame:IsMouseEnabled() - Returns whether mouse interactivity is enabled for the frame
- isOver = ScrollingMessageFrame:IsMouseOver([topOffset [, leftOffset [, bottomOffset [, rightOffset]]]]) - Returns whether the mouse cursor is over the given region
- enabled = ScrollingMessageFrame:IsMouseWheelEnabled() - Returns whether mouse wheel interactivity is enabled for the frame
- movable = ScrollingMessageFrame:IsMovable() - Returns whether the frame can be moved by the user
- isType = ScrollingMessageFrame:IsObjectType("type") - Returns whether the object belongs to a given widget type
- isProtected, explicit = ScrollingMessageFrame:IsProtected() - Returns whether the region is protected
- enabled = ScrollingMessageFrame:IsResizable() - Returns whether the frame can be resized by the user
- shown = ScrollingMessageFrame:IsShown() - Returns whether the region is shown
- enabled = ScrollingMessageFrame:IsToplevel() - Returns whether the frame is automatically raised to the front when clicked
- enabled = ScrollingMessageFrame:IsUserPlaced() - Returns whether the frame is flagged for automatic saving and restoration of position and dimensions
- visible = ScrollingMessageFrame:IsVisible() - Returns whether the region is visible
- ScrollingMessageFrame:Lower() - Reduces the frame's frame level below all other frames in its strata
- ScrollingMessageFrame:Raise() - Increases the frame's frame level above all other frames in its strata
- ScrollingMessageFrame:RegisterAllEvents() - Registers the frame for all events
- ScrollingMessageFrame:RegisterEvent("event") - Registers the frame for an [[docs/events|event]]
- ScrollingMessageFrame:RegisterForDrag(...) - Registers the frame for dragging
- ScrollingMessageFrame:RegisterUnitEvent() - This function is not yet documented
- ScrollingMessageFrame:SetAllPoints([region]) or ScrollingMessageFrame:SetAllPoints(["name"]) - Sets all anchor points of the region to match those of another region
- ScrollingMessageFrame:SetAlpha(alpha) - Sets the opacity of the region relative to its parent
- ScrollingMessageFrame:SetAttribute("name", value) - Sets a secure frame attribute
- ScrollingMessageFrame:SetBackdrop(backdrop) - Sets a backdrop graphic for the frame
- ScrollingMessageFrame:SetBackdropBorderColor(red, green, blue [, alpha]) - Sets a shading color for the frame's border graphic
- ScrollingMessageFrame:SetBackdropColor(red, green, blue [, alpha]) - Sets a shading color for the frame's background graphic
- ScrollingMessageFrame:SetClampRectInsets(left, right, top, bottom) - Sets offsets from the frame's edges used when limiting user movement or resizing of the frame
- ScrollingMessageFrame:SetClampedToScreen(enable) - Sets whether the frame's boundaries should be limited to those of the screen
- ScrollingMessageFrame:SetDepth(depth) - Sets the 3D depth of the frame (for stereoscopic 3D configurations)
- ScrollingMessageFrame:SetDontSavePosition() - This function is not yet documented
- isValid = ScrollingMessageFrame:SetFont("filename", fontHeight, "flags") - Sets the font instance's basic font properties
- ScrollingMessageFrame:SetFontObject(object) or ScrollingMessageFrame:SetFontObject("name") - Sets the `Font` object from which the font instance's properties are inherited
- ScrollingMessageFrame:SetFrameLevel(level) - Sets the level at which the frame is layered relative to others in its strata
- ScrollingMessageFrame:SetFrameStrata("strata") - Sets the general layering strata of the frame
- ScrollingMessageFrame:SetHeight(height) - Sets the region's height
- ScrollingMessageFrame:SetHitRectInsets(left, right, top, bottom) - Sets the insets from the frame's edges which determine its mouse-interactable area
- ScrollingMessageFrame:SetID(id) - Sets a numeric identifier for the frame
- ScrollingMessageFrame:SetJustifyH("justify") - Sets the font instance's horizontal text alignment style
- ScrollingMessageFrame:SetJustifyV("justify") - Sets the font instance's vertical text alignment style
- ScrollingMessageFrame:SetMaxResize(maxWidth, maxHeight) - Sets the maximum size of the frame for user resizing
- ScrollingMessageFrame:SetMinResize(minWidth, minHeight) - Sets the minimum size of the frame for user resizing
- ScrollingMessageFrame:SetMovable(enable) - Sets whether the frame can be moved by the user
- ScrollingMessageFrame:SetParent(frame) or ScrollingMessageFrame:SetParent("name") - Makes another frame the parent of this region
- ScrollingMessageFrame:SetPoint("point" [, relativeTo [, "relativePoint" [, xOffset [, yOffset]]]]) - Sets an anchor point for the region
- ScrollingMessageFrame:SetPropagateKeyboardInput() - This function is not yet documented
- ScrollingMessageFrame:SetResizable(enable) - Sets whether the frame can be resized by the user
- ScrollingMessageFrame:SetScale(scale) - Sets the frame's scale factor
- ScrollingMessageFrame:SetScript("scriptType", handler) - Sets the widget's handler function for a script
- ScrollingMessageFrame:SetShadowColor(shadowR, shadowG, shadowB, shadowAlpha) - Sets the color of the font's text shadow
- ScrollingMessageFrame:SetShadowOffset(xOffset, yOffset) - Sets the offset of the font instance's text shadow from its text
- ScrollingMessageFrame:SetShown() - This function is not yet documented
- ScrollingMessageFrame:SetSize(width, height) - Sets the size of the region to the specified values
- ScrollingMessageFrame:SetSpacing(spacing) - Sets the font instance's amount of spacing between lines
- ScrollingMessageFrame:SetTextColor(textR, textG, textB, textAlpha) - Sets the font instance's default text color
- ScrollingMessageFrame:SetToplevel(enable) - Sets whether the frame should automatically come to the front when clicked
- ScrollingMessageFrame:SetUserPlaced(enable) - Flags the frame for automatic saving and restoration of position and dimensions
- ScrollingMessageFrame:SetWidth(width) - Sets the region's width
- ScrollingMessageFrame:Show() - Shows the region
- ScrollingMessageFrame:StartMoving() - Begins repositioning the frame via mouse movement
- ScrollingMessageFrame:StartSizing() - Begins resizing the frame via mouse movement
- ScrollingMessageFrame:StopAnimating() - Stops any active animations involving the region or its children
- ScrollingMessageFrame:StopMovingOrSizing() - Ends movement or resizing of the frame initiated with [[docs/widgets/Frame/StartMoving|`:StartMoving()`]] or [[docs/widgets/Frame/StartSizing|`:StartSizing()`]]
- ScrollingMessageFrame:UnregisterAllEvents() - Unregisters the frame from any [[docs/events|events]] for which it is registered
- ScrollingMessageFrame:UnregisterEvent("event") - Unregisters the frame for an event
Script Handlers
- OnAttributeChanged(self, "name", value) - Run when a frame attribute is changed
- OnChar(self, "text") - Run for each text character typed in the frame
- OnDisable(self) - Run when the frame is disabled
- OnDragStart(self, "button") - Run when the mouse is dragged starting in the frame
- OnDragStop(self) - Run when the mouse button is released after a drag started in the frame
- OnEnable(self) - Run when the frame is enabled
- OnEnter(self, motion) - Run when the mouse cursor enters the frame's interactive area
- OnEvent(self, "event", ...) - Run whenever an [[docs/events|event]] fires for which the frame is registered
- OnHide(self) - Run when the frame's visbility changes to hidden
- OnHyperlinkClick(self, "linkData", "link", "button") - Run when the mouse clicks a hyperlink in the scrolling message frame or SimpleHTML frame
- OnHyperlinkEnter(self, "linkData", "link") - Run when the mouse moves over a hyperlink in the scrolling message frame or SimpleHTML frame
- OnHyperlinkLeave(self, "linkData", "link") - Run when the mouse moves away from a hyperlink in the scrolling message frame or SimpleHTML frame
- OnKeyDown(self, "key") - Run when a keyboard key is pressed if the frame is keyboard enabled
- OnKeyUp(self, "key") - Run when a keyboard key is released if the frame is keyboard enabled
- OnLeave(self, motion) - Run when the mouse cursor leaves the frame's interactive area
- OnLoad(self) - Run when the frame is created
- OnMessageScrollChanged(self) - Run when the scrolling message frame's scroll position changes
- OnMouseDown(self, "button") - Run when a mouse button is pressed while the cursor is over the frame
- OnMouseUp(self, "button") - Run when the mouse button is released following a mouse down action in the frame
- OnMouseWheel(self, delta) - Run when the frame receives a mouse wheel scrolling action
- OnReceiveDrag(self) - Run when the mouse button is released after dragging into the frame
- OnShow(self) - Run when the frame becomes visible
- OnSizeChanged(self, width, height) - Run when a frame's size changes
- OnUpdate(self, elapsed) - Run each time the screen is drawn by the game engine