12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 29 ■ Widget <strong>Reference</strong> 1207Returns:scrollChild—<strong>Reference</strong> to the Frame object scrolled by the scroll frame(frame)GetVerticalScrollReturns the scroll frame’s current vertical scroll position.scroll = ScrollFrame:GetVerticalScroll()Returns:scroll—Current vertical scroll position (0 = at top edge, frame:GetVerticalScrollRange() = at bottom edge) (number)GetVerticalScrollRangeReturns the scroll frame’s maximum vertical (bottom) scroll position.maxScroll = ScrollFrame:GetVerticalScrollRange()Returns:maxScroll—Maximum vertical scroll position (representing the bottom edge <strong>of</strong>the scrolled area) (number)SetHorizontalScrollSets the scroll frame’s horizontal scroll position.ScrollFrame:SetHorizontalScroll(scroll)Arguments:scroll—Current horizontal scroll position (0 = at left edge, frame:GetHorizontalScrollRange() = at right edge) (number)SetScrollChildSets the scroll child <strong>for</strong> the scroll frame.ScrollFrame:SetScrollChild(frame)The scroll child frame represents the (generally larger) area into which thescroll frame provides a (generally smaller) movable ‘‘window’’. The child musthave an absolute size, set either by in XML or using bothSetWidth() <strong>and</strong> SetHeight() in Lua.Setting a frame’s scroll child involves changing the child frame’s parent—thus,if the frame’s scroll child is protected, this operation cannot be per<strong>for</strong>medwhile in combat.Arguments:frame—<strong>Reference</strong> to another frame to be the ScrollFrame’s child.(frame)SetVerticalScrollSets the scroll frame’s vertical scroll position.ScrollFrame:SetVerticalScroll(scroll)Arguments:scroll—Current vertical scroll position (0 = at top edge, frame:GetVerticalScrollRange() = at bottom edge) (number)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!