Is it possible to prevent the scroll position from jumping back to the top when it does?
[EDIT] Removed irrlevant code for clarity.
Code: Select all
Global NewList PROBA()
Procedure GetTList()
for i = 1 to 300
AddElement (PROBA ())
PROBA () = random(10)
next
EndProcedure
Enumeration
#MainForm : #MainList : #MainList2
EndEnumeration
Procedure FillLists()
ClearList( PROBA() )
GetTList()
ResetList( PROBA() )
ClearGadgetItems(#MainList)
ForEach PROBA()
AddGadgetItem(#MainList,-1,str(PROBA()),-1,#PB_Unicode)
next
EndProcedure
X=10:Y=0:WF=500:HF=400
Window_1 = OpenWindow(#PB_Any, 66, 33, 640, 520, "TT", #PB_Window_SystemMenu)
ListViewGadget(#MainList,X ,45,WF-50,HF-(45+10))
AddWindowTimer(Window_1, 77, 2000)
Repeat
e = WaitWindowEvent()
if e = #PB_Event_Timer
FillLists()
endif
Until e = 13116