View Single Post
01/23/19, 11:29 AM   #6
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Had a little déjà vu. After some digging, I found an old topic showing that I too was struggling to get the control I linked above to resize the scroll list.

Actual solution does not lie in not setting the row controls' width as I wrote earlier, but in intercepting OnResizeStart/Stop events on the top-level control, and setting up an OnUpdate handler for the duration of the manual resize. This OnUpdate handler repeatedly calls ZO_ScrollList_Commit to fully refresh the list:
https://github.com/merlight/eso-merT....lua#L207-L215

Crude, but works. For smoother user experience, it should be throttled so that it doesn't commit the list every frame.

In current ESOUIDocumentation there are some events that didn't exist back then: OnRectChanged, OnRectWidth/HeightChanged. Haven't tested those yet, but if they fire on the scroll list control whenever its dimensions change due to anchor point updates, then these seem like a more appropriate solution.
  Reply With Quote