This short code works, when I double click on something in the list. I does not react to single-clicks. I can't see how this can be done?
Local MyWindow:TGadget=CreateWindow("no title", 200,200,320,240) Local List:TGadget=CreateListBox(10,10,200,100,MyWindow) For Local i=1 To 50 AddGadgetItem List,i Next Repeat WaitEvent() Select EventID() Case EVENT_GADGETACTION SetStatusText MyWindow, "Clicked on: "+GadgetItemText(List,SelectedGadgetItem(List)) End Select Until EventID()=EVENT_WINDOWCLOSE