|Go to Page...|
|Thread Tools||Display Modes|
|03-07-13, 06:45 PM||#1|
A Flamescale Wyrmkin
Join Date: Aug 2009
How to create a scroll frame in a few easy steps.
I've been working hard on building a Scroll Frame which (a) looks quite good and (b) doesn't require too much work to create. I have eventually completed it, and I thought I'd post it here to save the time of other people who are new to Scroll Frames. I've omitted fluff that isn't directly relevant to save space.
The following list details what frames are required to build the Scroll Frame (in short, 3 standard frames, and 1 frame which inherits a template):
(a) First create a standard frame and make it the size you wish your 'window' to be. This frame serves to do nothing other than hold all of the other elements in place and will be the 'master parent' of all of the frames related to this scroll frame.
(b) Create another frame, this time arg1 is "ScrollFrame" and arg 4 is "UIPanelScrollFrameTemplate" in the CreateFrame func. Parent it to the frame above.
(c) Create another frame, standard frame. Don't do anything with it yet, and don't parent it to anything yet. This will be the scrollchild (see code below).
(d) Create one more standard frame once the Scroll Frame is complete (this is the frame which will hold your option widgets etc).
Some things I've discovered:
(a) I've seen them created in other ways and without templates, but doing it this way ensures that functions are already written for the appropriate handlers. Decent functionality is achieved without the requirement to write any functions for the ScrollFrame.
If this has had anyone thinking "this bloke is trying to teach me how to suck eggs", I'm sorry. At the same time though, why are you still reading this lol?
In seriousness though, I hope this helps someone, as the post itself took half an hour!
Last edited by Aanson : 03-09-13 at 03:42 AM.
|WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » How to create a scroll frame in a few easy steps.|