Im using a ListView to display an scrolling list of messages, but the list keeps always the top messages, that were added first, and the newer ones are displayed only when I manually scroll the list. How can I force the ListView to always display the latest added elements?
Archive 17/01/2023.
Make ListView display last lines

rogerdv

cadaver
There’s no automatic or forced functionality for that, but you can set the scroll position programmatically after you add a new item. Check either SetViewPosition() or EnsureItemVisibility().

rogerdv
EnsureItemVisibility is not available in AngelScript, or at least was renamed and I cant find it in the docs. There is a SetviewPosition, but the parameters are not documented in AS API and I cant find it in the C++ documentation.

cadaver
As per the tradition of the AngelScript scripting API, Set / Get functions are often turned into properties. In this case too: IntVector2 viewPosition