Here if just typing any text all goes OK, but if trying to select predefined item, it returns empty text when getting text at event.
(while without #PB_ComboBox_Editable flag all goes OK).
Code: Select all
EnableExplicit
Global W = OpenWindow(#PB_Any, 100, 100, 200, 200, "test")
Global A = ComboBoxGadget(#PB_Any, 0,0, 100, 30, #PB_ComboBox_Editable)
AddGadgetItem(A, -1, "1")
AddGadgetItem(A, -1, "2")
Procedure EditCB()
Debug "Text: " + GetGadgetText(A)
EndProcedure
BindEvent(#PB_Event_Gadget, @EditCB(), W)
Repeat
If WaitWindowEvent(1) = #PB_Event_CloseWindow
Break
EndIf
ForEver