View Single Post
02-25-10, 09:42 AM   #18
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
Yeah it works kinda the same way in lua. But I am not sure the functionality is hidden as well. So if I hide the scroll bar it might stop the scrolling.

However, the scrollbar is linked to the scroll frame size and not the main frame itself. You can have the main frame any size you like ( within reason ) and scroll to access the other watchable quests. That was the whole reason for this addon, to allow the frame to be resizeable for visible decision but allow more than 2 or 3 quests to be tracked as required by users.

Try playing with /swf scroll x as well /swf height x and see the result there. I think if the scroll height is smaller than the frame height the bar will automatically disappear otherwise it will stay there.

Edit 1 : Actually, just looked at my code and it seems I have already added a test in there to hide the scrollbar if there is nothing to scroll, as in the scroll height is less than the frame height.

-- If the Scroll Size is less than the frame itself then hide the scrollbar as there is nothing to scroll
Code:
	if ( addonData["ScrollFrame"].ScrollSize > addonData["Frames"].SWF_WatchFrame:GetHeight() ) then
		addonData["Frames"].SWF_WatchFrame.ScrollBar:Show();
	else
		addonData["Frames"].SWF_WatchFrame.ScrollBar:Hide();
	end
Edit 2: Also, despite several placements of the following code it still reverts back to containing a scrollbar for some reason. Perhaps default functionality for the scrollframe template * shrugs *. But I can tell you that at the points where it does work the scrolling still works so it is feasibly possible. I just can't figure out which areas I have missed if it is indeed somewhere in my code that is overriding it. Hopefully during the course of the next update changes I'll track down the spots I need to add it to, to work.

Code:
	if ( not addonData["ScrollFrame"].BackGround.Enabled ) then
		f.ScrollBar:Hide();
	end
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 02-25-10 at 10:10 AM.