I am running through the great tutorials for MaxGUI that Assari made. I reached tutorial 8 and I encountered some strange behavior.
Here is the code:
SuperStrict
Import maxgui.drivers
Local MyWindow:TGadget=CreateWindow ("Listbox example",200,200,320,240)
Local ListBox:TGadget=CreateListBox (10,10,200,100,MyWindow)
For Local i:Int=1000 To 1050
AddGadgetItem Listbox,i
Next
Repeat
WaitEvent()
Select EventID()
Case EVENT_WINDOWCLOSE
End
Case EVENT_GADGETACTION
SetStatusText MyWindow,"Item Selected="+SelectedGadgetItem(ListBox)
EndSelect
Forever
It is supposed to set the window status to gadget item number, however that only happens if I double click an item instead of single clicking it. Do you have any idea why it happens and how to fix it?
|