PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Principle
  • Assisted input "in memory"
  • How to?
  • Examples
  • "Browsing" assisted input
  • How to?
  • "Programmed" assisted input
  • How to?
  • Example
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
The principle of assisted input in an edit control is straightforward: when the user starts to type in an edit control, a list is automatically expanded below the control, proposing the values that start with the text currently typed.
The assisted input can be implemented from the editor or it can be customized by programming.
Versions 19 and later
WEBDEV - Server code This feature is now available for WEBDEV sites.
WEBDEV - Server codePHP This feature is now available for WEBDEV sites in PHP.
WEBDEV - Browser code This feature is now available in browser code.
New in version 19
WEBDEV - Server code This feature is now available for WEBDEV sites.
WEBDEV - Server codePHP This feature is now available for WEBDEV sites in PHP.
WEBDEV - Browser code This feature is now available in browser code.
WEBDEV - Server code This feature is now available for WEBDEV sites.
WEBDEV - Server codePHP This feature is now available for WEBDEV sites in PHP.
WEBDEV - Browser code This feature is now available in browser code.
Versions 24 and later
WindowsLinux From version 24 Update 1, the assisted input in WINDEV application on Windows and Linux works in the same way as in the other platforms.
New in version 24
WindowsLinux From version 24 Update 1, the assisted input in WINDEV application on Windows and Linux works in the same way as in the other platforms.
WindowsLinux From version 24 Update 1, the assisted input in WINDEV application on Windows and Linux works in the same way as in the other platforms.
Principle
WINDEV, WINDEV Mobile and WEBDEV propose several types of assisted input:
  • Assisted input "in memory": The edit control is not bound to an item in a data file. The automatic input is made from a list of data provided in the code (<Edit>.AddAssistedInput). The data from the list is displayed according to the input.
  • "browsing" assisted input: The edit control is bound to an item in a data file or query. The data from the list is displayed according to the input.
  • Programmed assisted input: The assisted input is performed from a custom list of data. The display of data in the list according to the input is customized.
Assisted input "in memory"

How to?

To implement the assisted input "in memory":
  1. Use <Edit>.AddAssistedInput to add the elements taken into account by the assisted input.
  2. If necessary, use <Edit>.ConfigureAssistedInput to configure the characteristics of the assisted input: filter, list opening, number of characters typed before opening the list, ...

Examples

  • WEBDEV - Server codeWEBDEV - Browser codePHPAjax Example for a page:
    // Load code of the page
    EDT_Find.ConfigureAssistedInput(aiMinSize, 3)
    EDT_Find.ConfigureAssistedInput(aiFilter, filterContains)
     
    FOR EACH STRING sTitle OF gsPhotoTitles SEPARATED BY CR
    EDT_Find.AssistedInputAdd(sTitle)
    END
"Browsing" assisted input

How to?

To implement the "Browsing" assisted input:
  1. In the edit control description window:
    • Check whether the edit control is bound to an item in a data file or query ("Binding" tab).
      Caution: The item must be a key.
    • In the "Details" tab, check "Assisted input on file link".
  2. Validate the description window of edit control.
At run time, as soon as the first letter is typed in the control, a list is displayed with the different data corresponding to the letter typed.
Remarks:
  • If the edit control is bound to a query item, the query is automatically executed. However, if the query expects parameters, you must specify them (e.g., in the "Global declarations" or "End of initialization" events of the window) and then execute the query with <Source>.ExecuteRequest.
  • The display filter of the assisted input in a "Starts with" filter. To use another filter, you must use the programmed assisted input.
"Programmed" assisted input

How to?

The programmed assisted input is used to handle a custom data source.
To use the programmed assisted input:
  1. Disable the default filter with <Edit>.ConfigureAssistedInput (using the filterNone constant). Therefore, the list for the assisted input can be opened and it will display all the specified elements.
  2. In the event "Whenever modified" of the edit control:

Example

// "Contains" search performed in the name
// and code of an array of stock shares
FOR EACH sName, sCode of gArrShare
IF Contains(sCode, sSoughtValue) _OR_ ...
Contains(sName, sSoughtValue) THEN
SAI_Programmed_mode.AssistedInputAdd(sName)
END
END
Related Examples:
Photo_Gallery Complete examples (WEBDEV): Photo_Gallery
[ + ] This example is a photo gallery site and is composed of 2 main parts:
- the "visitor" part, developed in Active WEBDEV Page mode and SEO-compatible.
- the administration part, secured and developed in standard WEBDEV mode.  
 
These are some of the available features:
- organize photos via albums
- include links to social networks
- enable users to comment on posts
- user login via WEBDEV'S GPU
- contact form
- ability to upload, describe, and classify photos via albums on the administration side
The AssistedInput functions Unit examples (WINDEV): The AssistedInput functions
[ + ] Using the WLanguage AssistedInput functions.
These functions are used to easily implement an assisted input on the controls.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment