Scalabium Software |
|
Knowledge for your independence'. | |
Home Delphi and C++Builder tips |
#148: To enable autocomplete for edit/combobox |
|
Starting from IE 5.5 Microsoft added a very cool feature to any editboxes/comboboxes - you may start to enter some value and automatically will be suggested a value from "list" (previous typed) As you understand now I'll describe how to add such possibility to any editbox from your application:-) 1. you must declare a few const values: 2. you must declare a SHAutoComplete function from Shlwapi.dll library: 3. now you're ready to add an autosuggestion to your editbox: var Options: dWord; begin Options := SHACF_FILESYSTEM or SHACF_URLHISTORY or SHACF_URLMRU or SHACF_AUTOSUGGEST_FORCE_ON or SHACF_AUTOAPPEND_FORCE_ON; SHAutoComplete(yourEditBox.Handle, Options); end; Of course, you may remove some flags from Options parameter. For example, if you'll exclude the SHACF_URLHISTORY flag, end-user will not see the history of visited URLs NOTE:
|
|
Copyright© 1998-2024, Scalabium
Software. All rights reserved. |