;Autor: gnozal EnableExplicit Define EventID Procedure MyWindowCallback(WindowID, Message, wParam, lParam) Protected Result Result = #PB_ProcessPureBasicEvents Select Message Case #WM_COMMAND Select wParam >> 16 & $FFFF Case #CBN_DROPDOWN If lParam = GadgetID(1) SetGadgetText(2,"ComboBox is dropped") EndIf Case #CBN_CLOSEUP If lParam = GadgetID(1) SetGadgetText(2,"ComboBox is folded") EndIf EndSelect EndSelect ; ProcedureReturn Result EndProcedure If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ComboBoxGadget(1,10,10,100,20,0) AddGadgetItem(1,-1,"Test-Entry") TextGadget(2,10,50,200,20,"ComboBox is folded",0) SetWindowCallback(@MyWindowCallback()) Repeat EventID = WaitWindowEvent() Until EventID = #PB_Event_CloseWindow EndIf ; IDE Options = PureBasic 5.11 (Windows - x86) ; CursorPosition = 38 ; Folding = - ; EnableXP ; EnableUser