Click to unselect a ListView (when all items are selected)
Posted: Thu Sep 12, 2013 2:17 am
I find it a bit unusual that once all items are selected, the only way to un-select is to use the keyboard-arrows, cant be done by mouse!
Code: Select all
If OpenWindow(0, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListViewGadget(0, 10, 10, 250, 120, #PB_ListView_MultiSelect|#PB_ListView_ClickSelect)
For a = 1 To 5
AddGadgetItem (0, -1, "Item " + Str(a) + " of the Listview") ; define listview content
Next
SetGadgetState(0, 9) ; set (beginning with 0) the tenth item as the active one
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf