Now, whenever I scroll down there's a large amount of blank space below the last result. I think its because I don't have even 20s, I actually have 111 results to display. When it hits the last entry I want it to be at the bottom of the scrollbar and therefore you can't scroll farther down. How can I do this?
don't think of your internal indices as relating to the scroll offset -- think of the visual lines instead. in this case, it's 10 even tho you have 20 indices into your data. the scroll frame knows nothing about how you're drawing or what your data is, it just knows the numbers you tell it -- how many lines are in the list and how many lines are visible at any one time.
There's 111 results shown. Every time I scroll down the offset increases by 20. When I can't scroll down anymore its at offset 101. There's 5 displayed (actually 10, but side-by-side) and there's 5 rows that are blank under that. If I scroll up using the scrollbar on the right (1 by 1) the last entry (111) keeps switching from the right column and then alone on the left below the others. Perhaps I misunderstand but isn't FauxScrollFrame supposed to just stop scrolling and 111 would just be one on the left side by itself?
Thanks for your help! I fixed it and it works perfectly. I only had one more problem and in case anyone else ever reads this i'll put the solution. The problem: it wasn't showing the final one (111). With update:
totalNumberOfLines = 56
visibleLines = 10
heightOfASingleLine = however tall your buttons are
You told me to divide totalNumberOfLines by 2 since i'm doing 2 per row (20, 10 on each side)
Since I had 111 it of course divides to 55.5 since its uneven, and the LUA interpreter apparently just drops the .5 instead of rounding, so the total number came out to 110. I solved it by rounding the 111/2.