Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-22-24, 05:08 PM   #1
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 324
How to track the scroll position of a WowScrollBoxList

I would like my addon to keep track of the current scroll position of the achievements frame scroll box.
But the scroll box only seems to have an OnMouseWheel script.

Lua Code:
  1. AchievementFrameAchievements.ScrollBox:HookScript("OnMouseWheel", function(self)
  2.   print(AchievementFrameAchievements.ScrollBox.scrollPercentage)
  3. end)

The same goes for its scroll bar.

Lua Code:
  1. AchievementFrameAchievements.ScrollBar:HookScript("OnMouseWheel", function(self)
  2.   print(AchievementFrameAchievements.ScrollBox.scrollPercentage)
  3. end)

But what if the user changes the scroll position dragging the scroll bar or clicking the scroll bar steppers?
Are there scripts to hook as well?

Is there not an easier way? Like a scroll frames' OnVerticalScroll script?
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » How to track the scroll position of a WowScrollBoxList


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off