Scroll Frame Buttons not visible
Hi all
Whoot got it all working. The major things I learnt to get this working; Make sure that you are calling the correct frame, even if it looks the same, (I had an extra space). Make sure all variables are local, even if they are in a local function. Make the step value that same as the button height, this ensures the scroll stops at the maximum of the list. This is my final update code chunk; Lua Code:
And my final scroll frames; Lua Code:
Here is a link to the scroll frame example that I have been referencing. Thanks to all for your suggestions and help. Cheers |
In this case, I would try first to add this debug line before "SetText()" at line 7:
Code:
print("index=", index, "offset=", offset, "SpellChatGlobalTable1[offset]=", SpellChatGlobalTable1[offset]) |
Just like I said there was a total small thing that prevented that buttons displaying.
In the update function I tried to update the scrollFrame which was not actually a frame in my code, I replaced it with the correct DeathKnightFrameScrollChild frame and now the buttons display. However, I still have not been able to get the scroll frame to scroll. I have been checking out other addons to see how they scroll without any success, so any further help would be great. @Zax your suggestion of adding in a debug print does help, it is far too often that I could probably identify problems much earlier if I simply added debug prints :) |
I recently used this tutorial and it works:
https://wow.gamepedia.com/Making_a_s...lFrameTemplate Though I had to replace: Code:
FauxScrollFrame_Update(MyModScrollBar,50,5,16); Code:
FauxScrollFrame_Update(MyModScrollBar,50,5,16, nil, nil, nil, nil, nil, nil, true); |
Hi Zax
Thanks for that, I have tried adding all of the elements however that change had no effect. I have not got the scroll frame working properly. I can do a manual scroll by grabbing the scroll button and dragging. But note the manual scrolls way beyond the last button which is also something that should not happen. So I am still stuck on this one. Here is an updated gif showing what is happening. I really cannot see how this doesn't work, and it has got me banging my head against the desk. |
I have yet to identify the cause of the overscrolling myself. Likely a number misrepresented somewhere that is telling it that there are more entries.
|
Hi Xrystal
I have got some of this working. In my update function, I made the variables at line 9 & 10 local. In my frame code, I made the variable at line 31 local. So the last issue I have left is that I can still scroll beyond the end of the list of buttons. I have updated my OP to reflect the current status of my issue. :) |
Whoot finally got it solved.
I had to make the step value the same as the button height. I have edited the OP so all searching can see it first up. Cheers all |
All times are GMT -6. The time now is 09:33 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI