[Linux]ListView - Multiple Selection
Posted: Fri Jan 02, 2004 1:17 pm
Code updated For 5.20+
So and here is an example for setting the ListViewGadget to muliple selection.
best regards,
Christian
So and here is an example for setting the ListViewGadget to muliple selection.
Code: Select all
hnd = OpenWindow(0, 0, 0, 500, 500, "Set Editor Editable", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If hnd
ListViewGadget(0, 0, 0, 500, 450, #PB_ListView_MultiSelect)
For i = 0 To 50
AddGadgetItem(0, -1, "item"+Str(i))
Next i
ButtonGadget(1, 175, 460, 100, 25, "Select All")
Repeat
Select WaitWindowEvent()
Case #PB_Event_Gadget
Select EventGadget()
Case 1
;gtk_list_select_all_(GadgetID(0)); select all items"
For i = 0 To CountGadgetItems(0) - 1
SetGadgetItemState(0,i,1)
Next
EndSelect
Case #PB_Event_CloseWindow
quit = 1
EndSelect
Until quit = 1
EndIf
End
Christian