Please use the code tags, this makes it easier to see the code of your post.
And I think your question is wrong.
I think you want always to see the top of the ListView and not the top of the window.
And I don't know how to scroll a window
Since I'm not 100% sure what you want, you have to comment/uncomment to see the differences:
Code: Select all
If OpenWindow(0,0,0,305,140,"TEST",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ListViewGadget(0,10,10,285,120)
AddWindowTimer(0, 1, 100)
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Timer
If t = 50
RemoveWindowTimer(0, 1)
Else
AddGadgetItem(0, 0, Str(t))
;AddGadgetItem(0, -1, Str(t))
SetGadgetState(0, t)
t + 1
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf