Code: Select all
NewList Test.s()
For a = 1 To 12
AddElement(Test())
Test() = "Item " + Str(a) + " of the Listview"
Debug Test()
Next
If OpenWindow(0, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListViewGadget(0, 10, 10, 250, 120)
ForEach
AddGadgetItem Test()
Next
SetGadgetState(0, 9) ; set (beginning with 0) the tenth item as the active one
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
