Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Return Key Closing SmartDialog with AutoComplete ComboBox
#1
Hi,
I am using a ComboBox to fill another text box with the multiple successive choices of the user in a dialog.
Each time a ComboBox item is selected, the choice is added to the previous choices and redisplayed in a display field, like this:

Macro
Code:
Copy      Help
case CBN_SELCHANGE<<16|23
,str SelectedCustomTag
,if(CB_SelectedItem(id(23 hDlg) SelectedCustomTag) >= 0)
,,str CumulativeSelectedCustomTagsForDialog.getwintext(id(39 hDlg))
,,CumulativeSelectedCustomTagsForDialog.addline(SelectedCustomTag)
,,CumulativeSelectedCustomTagsForDialog.setwintext(id(39 hDlg))

I would like to use this in combination with the Function dlg_combo_autocomplete
Code:
Copy      Help
dlg_combo_autocomplete
from the Resources Archive.

Both are working, but there is no obvious way to "select" the choice that the autocomplete "offers". One way to indicate that you want to actually select it, would be to hit Enter but for some reason this closes my Dialog. I have taken out OK and Cancel buttons (I manage that with custom buttons). Not sure how to have the Enter/Return keypress just be directed to the ComboBox.

I think this is tapping into something fundamental about dialogs. I hope the answer is easy but that I will have a big "a-ha" from it.

Stuart
#2
Function dlg_combo_autocomplete
Code:
Copy      Help
,case IDOK
,out "Enter pressed"
,ret
#3
Perfect Thanks!!!!
Stuart


Forum Jump:


Users browsing this thread: 1 Guest(s)