Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » ComboBox in Menu Bar (Auto-complete feature) Collapse All
Subject Author Date
Helen Lee Jul 17, 2011 - 2:47 AM


I have a combo box that saves history IPs typed in by users.  When a user starts typing into the combo box, it should search for the closest match item, instead, the combo box completes the whole IP as soon as the first character is entered.

For example, I have IP strings:

As soon as I key in ’1’, the combo box fills in ’’, without finding the next closest match.  This only happens when I embed a combo box on a toolbar and menubar.  This can be reproduced in ProfUIS_Controls project.  Select ’Menu and Toolbars’, add the above IP strings into the combo box - m_wndComboBoxInToolbar.  I tried different combobox styles but couldn’t get it to work.

Thank you for your help~



Technical Support Jul 18, 2011 - 12:07 PM

We received your e-mail and replied it. Thank you.

Helen Lee Jul 17, 2011 - 8:03 PM

I’m sending over a test project which reproduces the problem.  It doesn’t work on IP nor regular text when the combo box is created inside the toolbar or menubar control.

I put one combobox in a toolbar control and another one directly on the form so you can see the difference.

The combobox created directly on the form will give user suggestion and highlight on next characters, but the one inside the toolbar does not.



Technical Support Jul 17, 2011 - 10:24 AM

The CExtComboBox control supports text auto completion. It works with text items, not with IP addresses. You can create a CExtComboBox-derived class, override the WindowProc() virtual method and handle the __EXT_COMBO_BOX_WM_USER_AUTOCOMPLETE message to implement your own IP address auto completion algorithm. You can copy handler code from the CExtComboBoxBase::WindowProc() method and modify it for IP address specific auto completion.