Hi, I'm trying to get a listbox working, very simple from tutorial:
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=10 To 15
AddGadgetItem ListBox,i
Next
Local s:String
Repeat
WaitEvent()
Select EventID()
Case EVENT_WINDOWCLOSE
End
Case EVENT_GADGETACTION
s=GadgetItemText(ListBox,SelectedGadgetItem(ListBox))
SetStatusText MyWindow, SelectedGadgetItem(ListBox) + ":" + s
End Select
Forever
It runs, but I have have to click several times in order to get the selected gadget. After it's shown for the first time (status text), I still need to double click in order to refresh.
Is this the default behavior? If it is, is there a way to just single click the item and refresh it sooner?
I'm using Blitzmax 1.37 and maxgui 1.39 on windows. Thanks in advance.
|