![]() |
This is no longer a part of the World of Warcraft API.
|
Links |
---|
Sets the backdrop texture of a frame.
Frame:SetBackdrop(nil or { -- defaults bgFile = "bgFile", edgeFile = "edgeFile", tile = false, tileEdge = false, tileSize = 0, edgeSize = 32, insets = { left = 0, right = 0, top = 0, bottom = 0 } })
Arguments
- bgFile
- string - Texture path to use for the background
- edgeFile
- string - Texture path to use for the edges
- tile
- boolean - True if the background texture should tile, false if it should stretch
- tileSize
- number - If
tile
is true, size of each tiled copy of the bgFile - tileEdge
- boolean
- edgeSize
- number - Size of the edgeFile (i.e. border thickness and corner size)
- insets - left, right, top, bottom
- number - How far from the edges the background will be drawn (e.g. use higher values for thicker edges)
Details
- Passing
nil
as the only argument removes the backdrop.
Example
Sets a backdrop with UI-Tooltip-Background and UI-Tooltip-Border (FrameXML example).

Backdrop colored blue, 50% transparency
local f = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
f:SetPoint("CENTER")
f:SetSize(128, 128)
f:SetBackdrop({
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
f:SetBackdropColor(0, 0, 1, .5)
Patch changes
Patch 9.0.1 (2020-10-13): Removed; replaced with BackdropTemplate[1][2]
Patch 1.7.0 (2005-09-13): Added.[3]
See also
- Frame:SetBackdropColor()
- Frame:SetBackdropBorderColor()
- TooltipBackdropTemplate
- TooltipBorderBackdropTemplate
References
- ^ a b Daniel Yates (Meo
rawr). 9.0.1 Consolidated UI Changes: Backdrop System Changes.
- ^ Backdrop.xml, patch 9.0.1, archived at Townlong-Yak
- ^
Slouken. Re: Upcoming 1.7 Changes - Concise List. Archived from the original