Thread: frame sizes
View Single Post
10-21-05, 08:44 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
You can set anchors instead of width/height.

In lua:

frame:ClearAllPoints() -- removes all anchors
frame:SetPoint("TOPLEFT","UIParent","TOPLEFT")
frame:SetPoint("BOTTOMRIGHT","UIParent","BOTTOMRIGHT")

in xml:

<Anchors>
<Anchor point="TOPLEFT" relativeTo="UIParent" relativePoint="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="UIParent" relativePoint="BOTTOMRIGHT"/>
</Anchors>

This will stretch the frame to cover the whole screen even if it resizes. I commonly use this to stretch a background texture in a frame. Once anchored to both corners there's no need to go back to it if I change the size of the window.

Last edited by Gello : 10-21-05 at 08:51 AM.
  Reply With Quote