![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Mon, Mar 21 2016 6:53 AM | Permanent Link |
Luk | Hi,
Is it easy to add an autocomplete option like shown in https://jqueryui.com/autocomplete/ to the TEdit component ? An example how to do something similar would be very welcome ![]() Thanks. |
Mon, Mar 21 2016 7:24 AM | Permanent Link |
Matthew Jones | Luk wrote:
> Is it easy to add an autocomplete option like shown in > https://jqueryui.com/autocomplete/ to the TEdit component ? An > example how to do something similar would be very welcome ![]() Shouldn't be too hard. Key is to detect the change using the normal event, and then do whatever the lookup you are wanting and display the results. Typically this will be a server call, so asynchronous. I'd say the harder part would be to detect the key up/down to do the selection in the list, but not impossible certainly. -- Matthew Jones |
Tue, Mar 22 2016 10:19 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Luk,
<< Is it easy to add an autocomplete option like shown in https://jqueryui.com/autocomplete/ to the TEdit component ? An example how to do something similar would be very welcome ![]() You wouldn't want to use the TEdit control as the starting point. If you look in the WebEdits unit, you can see how this is fairly trivial using the TEditComboBox or TEditComboControl as the ancestor class. You would just need a timer to detect when X milliseconds have elapsed without a keystroke, and then fire off a TServerRequest to get the list of items that you want to populate in the Items property. Then you can call DoDropDown (protected method) to display the drop down list. Tim Young Elevate Software www.elevatesoft.com |
Thu, Mar 24 2016 8:35 AM | Permanent Link |
Luk | I would use the TStringList to show all the items. When the user starts typing, I would like to reduce the list to show only items containing the text the user typed.
In javascript, I found the function: search Do I need to add this function as an external function ? Or can I use an internal function to do this ? Or should I write my own search function ? Trying to create my first component ... Thanks |
Mon, Mar 28 2016 1:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Luk,
<< I would use the TStringList to show all the items. When the user starts typing, I would like to reduce the list to show only items containing the text the user typed. In javascript, I found the function: search Do I need to add this function as an external function ? Or can I use an internal function to do this ? Or should I write my own search function ? >> You cannot mix JavaScript code into a visual control. You must use Object Pascal to create such a control, otherwise you're introducing dependencies that can break anyone's application that uses the control. If you aren't familiar with component/control development, especially in Delphi, then you may have some trouble trying to do something like this with EWB. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, March 29, 2023 at 10:59 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |