Adding a ScrollFrame to a CharacterFrame tab
So I am trying to write my first addon, it would just list a table of results 2 columns on the tab.
My initial idea was to have next and previous buttons to look through the results. But I have since discovered there is a scroll frame, so was wanting to use a scroll frame instead. The table itself will have 1 row added to the results for each day that the character was logged into. A scroll frame should be ok right if it had a lot of data, as in a year or more? Lua Code:
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ http://wowprogramming.com/FrameXML/UI.xsd"> Code:
Interface/SharedXML/SecureUIPanelTemplates.lua:64: attempt to call method 'SetVerticalScroll' (a nil value) Code:
Interface/SharedXML/SecureUIPanelTemplates.xml:120 Frame AMD_TabOnCharacterFrame_History_ScrollFrame: Unknown script element OnScrollRangeChanged Code:
Interface/SharedXML/SecureUIPanelTemplates.xml:121 Frame AMD_TabOnCharacterFrame_History_ScrollFrame: Unknown script element OnVerticalScroll |
Lists are complicated until you understand them.
This is a list example created by someone else and loosly based on what I know of your addon. The AppendListItem function is actually creating the the information table that is displayed in the list. XML XML Code:
lua: Lua Code:
|
This is what I use right now to output the list contents to the frame.
I thought I would just use the same code but change the frame that was the output. Lua Code:
|
On another note I also asked about how to add a tab to the character frame on the official Blizzard forums, someone there responded with the code below.
This is what gave me the idea of a scroll frame, initially, I dismissed it however, and was still going to go with the next and previous buttons, I've since changed my mind. Lua Code:
|
All times are GMT -6. The time now is 09:07 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI