Thread Tools Display Modes
03-13-11, 05:17 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
"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. :/

Last edited by Duugu : 03-14-11 at 06:21 PM.
  Reply With Quote
03-15-11, 10:21 PM   #2
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
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. :/
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » "Cutting" frame 'contents' on edges

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off