On 17 October 2011 15:58, Van Nguyen <[email protected]> wrote: > I try to implement an Combo Box that Suggests Options. > Eg: if I enters "ES" in the symbol box, only those items that have ES > somewhere > in their name will show > up, like ESCAPE, TEST. > But the implemented ComboBox doesn't show dropdow list, > show user must click on button of ComboBox to show it. > > Source: > > import Graphics.UI.WX > import Graphics.UI.WXCore > import Graphics.UI.WX.Events > import Data.List > symbols = > ["ESH11","VIETTEL","METFONE","VIETNET","MENFONE","HUNET"] > > --filter item in the symbols list > searchString :: String -> String -> String > searchString strInput strRaw = do > if strInput `isInfixOf` strRaw then > strRaw > else > "" > > dataManager :: IO () > dataManager = do > frmDataManager <- frame [text:= "Data Manager"] > cbbSymbols <- comboBoxEx frmDataManager wxCB_DROPDOWN [visible := True]
The style you are using is "wxCB_DROPDOWN". From [1], there is another style called "wxCB_SIMPLE", maybe that is what you want. Image example of both is show at [2]. -- [1] http://docs.wxwidgets.org/trunk/classwx_combo_box.html [2] http://www.java2s.com/Tutorial/Python/0380__wxPython/Twocomboboxes.htm ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ wxhaskell-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
