WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   "Cutting" frame 'contents' on edges (https://www.wowinterface.com/forums/showthread.php?t=39262)

Duugu 03-13-11 05:17 PM

"Cutting" frame 'contents' on edges
 
I'm currently using a ScrollFrame to show some content (frames, textures, and stuff) 'inside' a container frame.
'inside' here means the contents are clipped at the container frame borders.

An basic example could be

Code:

local containerFrameObj = CreateFrame("ScrollFrame", "PeonManagerContainer", UIParent)
containerFrameObj.ScrollValue = 0

local contentObj = CreateFrame("Frame", "PeonManagerContent", containerFrameObj)
containerFrameObj:SetScrollChild(contentObj)

local stuffObj = CreateFrame("Button", "Stuff", contentObj)

With this sample code every child of PeonManagerContent (stuffObj here) is only visible within the borders of PeonManagerContainer.

My problem with this: unfortunately the ScrollFrame widget don't places the content stuff according to the content's parent/child structure. Furthermore the frame level and the frame strata are ignored inside a ScrollFrame (or at least they’re heavily buged). Due to this the ScrollFrame is more or less unusable for me – I must set frame levels and stratas for the contents.

But how could I implement this without a ScrollFrame? I have no ideas. :/

Duugu 03-15-11 10:21 PM

Well ... ScrollFrame seems to be a uncommon frame type. ;D

Temporary 'solved' the problem by pre-creating the frames according to the desired level/layer structure. Not smart but basically working. :/


All times are GMT -6. The time now is 02:57 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI