|
- Type of search
- parameter
- Uppercase/Lowercase characters
- Seeking and selecting an element in a List Box or Combo Box control
- Seeking an element in a browsing List Box or Combo Box control: search on the stored value or on the displayed value
- Search and selection in a List Box control
- Miscellaneous
ListSeek (Function) In french: ListeCherche Seeks an element in a List Box control (standard list box or listview) or in a Combo Box control (including the values described by gLink).
Note: ListSeek can be used on: - the browsing or memory List Box controls,
- single-selection or multiselection Looper controls.
// Find the element "Moore" in the List Box control "LIST_CustomerList" ResSeek = ListSeek(LIST_CustomerList, "Moore")
Syntax
<Result> = ListSeek(<List Box control> , <Sought element> [, <Type of search> [, <Start of search>]])
<Result>: Integer - Subscript of element found.
- -1 if no element corresponds to the search.
The element found is not selected. To select the element found, use ListSelectPlus.
<List Box control>: Control name Name of List Box (or Combo Box) control to use.
If this parameter corresponds to an empty string (""), the element is searched in the control to which the current event belongs.
<Sought element>: Character string (with quotes) Element to find in the specified List Box (or Combo Box) control. <Type of search>: Optional boolean - True (default value) for an exact-match search,
- False for a generic search.
<Start of search>: Optional integer Subscript from which the search will start in the List Box or Combo Box control. If this parameter is not specified, the search is performed in the entire control. This parameter is ignored for the memory List Boxes.
Remarks Type of search - Exact-match search:
The elements whose value is strictly equal to <Sought element> are returned by ListSeek. For example:
// Return all the customers named "Doe" found in "LIST_Name" ListSeek(LIST_Name, "Doe")
- Generic search:
The elements starting with <Sought element> are returned by ListSeek. For example:
// Return all customers whose name starts with "SMI" ListSeek(LIST_Name, "SMI", False)
<Start of search> parameter The <Start of search> parameter is used to find all the occurrences of a string in a List Box or Combo Box control. For example, to count the number of names starting with "SMI" in the "LIST_CustomerList" control:
Subscript is int Cnt is int = 0 // Position on the first corresponding element Subscript = ListSeek(LIST_CustomerList, "SMI", False) WHILE Subscript <> -1 Cnt++ // Find the next name starting with "SMI" Subscript = ListSeek(LIST_CustomerList, "SMI", False, Subscript + 1) END
This page is also available for…
|
|
|
| |
| Como alimentar uma combo por uma tablegrid? |
|
| https://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/3188-como-alimentar-uma-combo-por-uma-tablegrid/read.awp |
|
|
|
| |
| |
| |
|
| | Nessa dica de hoje, vou mostrar como procurar, para ver se existe ou nao no listbok //==================== In this tip today, I'll show you how to look, To see if it exists or not in listbok //==================== Dans cette astuce aujourd'hui, Je vais montrer comment la recherche, pour voir si le listbok ou non //==================== s_Existe_ is string=ListSeek(LISTE_EstadosProgramacao,SAI_Uf) IF s_Existe_ <> -1 THEN // quer quizer que existe Info("Existe"+LISTE_EstadosProgramacao) ELSE Info("Nao Existe Tabela") END //================ http://windevdesenvolvimento.blogspot.com.br/2017/03/aula-1082-windev-listbox-013-listbox.html
https://www.youtube.com/watch?v=5GkFp36Bbxw
|
|
|
|
| |
| |
| |
| |
| |
| |
| | |
| |