If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ComboBoxGadget(1,10,10,100,20,#PB_ComboBox_Editable) AddGadgetItem(1,-1,"Testitem",0,0) SetGadgetState(1,0) SendMessage_(GadgetID(1),#CB_SETEDITSEL,0,5<<16+2) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf