Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 Tech Support » AutoCompleate ComboBox GetCurSel method Collapse All
Subject Author Date
Bahrudin Hrnjica Mar 24, 2006 - 12:25 AM

If you start writing text in the combobox and get compleated text from the list box. After that, if you want to get current index of the selected item from the listbox, return value of the GetcurSel is LB_ERROR(-1).

Technical Support Mar 24, 2006 - 5:30 AM

When the text is completed it does not mean that the corresponding item from the list box is selected, because the list box may contain several items matching the text. You need to manually find the appropriate item with the FindString() method.

Bahrudin Hrnjica Mar 24, 2006 - 10:11 AM

Correct, but if I confirm completed text with TAB or ENTER key, steal GetCurSel is returning -1.

Technical Support Mar 28, 2006 - 8:12 AM

It is possible to implement the change of the currently selected item index during the auto complete action tracking. But we think the auto complete is not related to the selection change. It has do to with the window text change only. Please use the CComboBox::FindString() and CComboBox::FindStringExact() methods for detecting the item index.