AutoCompleteField[list_: {}, displayNum_: 3, imageSize_: 100] := ( Module[{x = "", focus = False, Only = Function[{l, n}, Take[l, Min[Length[l], n]]] } , ToBoxes[Column[{EventHandler[ InputField[Dynamic@x, String, ContinuousAction -> True, ImageSize -> imageSize] , { "ReturnKeyDown" :> (MessageDialog[x]), "MouseEntered" :> (focus = True), "MouseExited" :> (focus = False)}], Dynamic@If[focus || x != "", Column[Map[ Function[ EventHandler[ Framed[Pane[#, ImageSize -> Dynamic[(CurrentValue[EvaluationNotebook[], WindowSize][[1]] - 120)]], FrameMargins -> 0, FrameStyle -> Gray], {"MouseClicked" :> (x = #)}]], Select[list, StringMatchQ[#, x ~~ ___, IgnoreCase -> True] &]~Only~ displayNum]], ""]}]] ] )