View Single Post
Unread 02-12-13, 02:46 PM   #16
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,372
I finshed my test and implemented a first version into my panel.

http://imgur.com/a/4WtBM

You can even freely resize the whole panel and the scrollFrame will be cropped properly. The scrollbar adjusts properly aswell. Very nice.

All what I had to do was:
http://code.google.com/p/rothui/sour.../subFrames.lua

If you are fine with the default template you can even go with

Lua Code:
  1. --create a scrollframe inside
  2.     local scrollFrame = CreateFrame("ScrollFrame", "$parentScrollFrame", frame, "UIPanelScrollFrameTemplate")
  3.     scrollFrame:SetPoint("TOPLEFT")
  4.     scrollFrame:SetPoint("BOTTOMRIGHT",-22,0)
  5.  
  6.     local scrollChild = CreateFrame("Frame",nil,ScrollFrame)
  7.     --scrollChild:SetWidth(scrollFrame:GetWidth()) --optional
  8.     --fill scrollchild with data and adjust size
  9.     genData(scrollChild,100)
  10.     scrollFrame:SetScrollChild(scrollChild)
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline   Reply With Quote