Quantcast

Holding the ALT key when clicking the ScrollBar's up or down button will move the position to the top or bottom of the list.

James D. Callahan III [06-29-10 - 08:02]
Holding the ALT key when clicking the ScrollBar's up or down button will move the position to the top or bottom of the list.
Filename
Frame.lua
diff --git a/Frame.lua b/Frame.lua
index 9125739..1eb9490 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -2205,12 +2205,22 @@ do

 	ScrollUpButton:SetScript("OnClick",
 				 function(self, button, down)
-					 ScrollBar_Scroll(1)
+					 if _G.IsAltKeyDown() then
+						 local min_val = ScrollBar:GetMinMaxValues()
+						 ScrollBar:SetValue(min_val)
+					 else
+						 ScrollBar_Scroll(1)
+					 end
 				 end)

 	ScrollDownButton:SetScript("OnClick",
 				 function(self, button, down)
-					 ScrollBar_Scroll(-1)
+					 if _G.IsAltKeyDown() then
+						 local _, max_val = ScrollBar:GetMinMaxValues()
+						 ScrollBar:SetValue(max_val)
+					 else
+						 ScrollBar_Scroll(-1)
+					 end
 				 end)

 	ScrollBar:SetScript("OnMouseWheel",