When I select text from the list no problem. If the text is set by the programme getgadgettext returns the last selected text. Code below to demonstrate. Click the right button which should give you the text no bother click left button once then click right button text not returned?
Am I missing something here?
Code: Select all
Global Window_0
Global Combo_0,Button_0,Button_1
Window_0 = OpenWindow(#PB_Any, 0, 0, 600, 400, "", #PB_Window_SystemMenu)
Combo_0 = ComboBoxGadget(#PB_Any, 120, 40, 200, 30, #PB_ComboBox_Editable)
Button_0 = ButtonGadget(#PB_Any, 240, 140, 100, 20, "")
Button_1 = ButtonGadget(#PB_Any, 140, 140, 100, 20, "Set")
;Load Combo List
For iLoop = 1 To 10
AddGadgetItem(Combo_0,-1,"Item " + Str(iLoop))
Next
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
End
Case #PB_Event_Gadget
Select EventGadget()
Case Button_0
Debug GetGadgetText(Combo_0)
Case Button_1
SetGadgetText(Combo_0,"test text")
EndSelect
EndSelect
ForEver