View Single Post
05/11/16, 12:54 PM   #18
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by Letho View Post
I don't even understand the principle behind it's mechanic, I mean the princible I use in my code is quite easy: move the child Elements of a control that hides all of its child element's overflow by modifying the child elements anchor-x/y-offsets^^
The principle behind ZO_ScrollList is separating data from controls. That way you can have thousands of data items in a list, and only a bunch of controls to display them (well in your case, there'll be a lot of icons visible at once, but still less than all of them, right?).

The simplest use of ZO_ScrollList I could quickly find is AbilityList. Here it's initialized with two row types, and
here it's filled with data. All you need is a control created from the ZO_ScrollList template, either in XML or in Lua:
Lua Code:
  1. local list = wm:CreateControlFromVirtual("$(parent)List", parent, "ZO_ScrollList")
and a template for your row type, that must be defined in XML (unless you replace the row pool's factory function).

Another example is in LibAddonMenu.

Originally Posted by Letho View Post
Within my implementation the "too many anchors processed" - error is even thrown if i reduce my dataset to 10 elements
That usually happens when your anchors have circular dependency. Which includes a kind of chicken&egg problem when a container control has resizeToFitDescendents="true" and its children are trying to fill the parent.
  Reply With Quote