FauxScrollFrame in pure LUA problem
Hello,
Sorry if it has already been asked but I encounter a problem with FauxScrollFrame. In the past, I used this kind of frame with XML without problem, but now I'm trying in pure LUA. When I click on the arrows to scroll, I have this error: Quote:
Code:
frameScroll:SetScript("OnVerticalScroll", function () Thank you for your help. |
The problem is that your OnVerticalScroll function isn't storing its parameters in a value.
In Xml it is automatically stored in the variable used but in Lua you have to store it yourself OnVerticalScroll(self, offset) - Run when the scroll frame's vertical scroll position changes. |
offset is a parameter passed to the script which is then passed to your function as the second parameter.
Code:
frameScroll:SetScript("OnVerticalScroll", function (self, offset) |
OK, I understand.
Quote:
|
Quote:
|
Oops !
Thank you very much :) |
My scroll frame works fine, but I have another question: apparently, FauxScrollFrame_Update has an option to not always show scroll buttons.
I'm unable to make option alwaysShowScrollBar work: scroll buttons are always visible, even if the scroll frame contains one line. Code:
-- Function to handle the update of manually calculated Blizzard_AuctionHouseCategoriesList.lua Code:
FauxScrollFrame_Update(categoriesList.ScrollFrame, #EXPANDED_FILTERS, NUM_FILTERS_TO_DISPLAY, BROWSE_FILTER_HEIGHT, nil, nil, nil, nil, nil, nil, alwaysShowScrollBar) |
OK, after several tests, in order to make my scroll frame work, whenever the number of lines in data is lower or greater then the number of "displayable" lines, I have to pass true as last parameter:
Code:
FauxScrollFrame_Update(myScrollerFrame, numDataLines, maxVisibleLines, lineHeight, nil, nil, nil, nil, nil, nil, true) |
All times are GMT -6. The time now is 05:49 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI