ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / List Box functions
  • Multi-selection List Box control
  • Modified element
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Modifies an element in a List Box, ListView or Combo Box control populated programmatically.
Note: The <List Box>.Modify function can be used on both the List Box control and multiselection fields. .
Example
// Modification de l'élément situé à l'indice 4 dans le champ Liste "LISTE_ListeClient"
LISTE_ListeClient.Modifie("Dupond", 4)
Reports and Queries
// Modification de l'image située à l'indice 4 dans le champ Liste "LSI_Plongée"
LSI_Plongée.Modifie("Belles gorgones", "C:\MesImages\Gorgones.JPG", 4)
Syntax
<List Box control>.Modify(<Element> [, <Image> [, <Element index>]])
<List Box control>: Control name
Name of control to use:
  • List Box control,
  • Combo Box control.
<Element>: Character string
Element to modify in the specified List Box (or Combo Box) control.
<Image>: Optional character string
Name and path of image that will be added into a ListView control. This parameter is taken into account for ListView controls displayed in ListView mode only.
If this parameter is not specified, the default image (defined in the "Detail" tab of the control description window) is used..
<Element index>: Optional integer
Index of the element to be modified.
If this parameter:
  • is not specified or if it is set to -1, the current element is modified. <List Box>.Modify has no effect if there is no current element.
  • is equal to 0, the first element is modified.
  • is greater than the number of items in the List Box control (or Combo Box control), a WLanguage error is generated.. The number of elements in a List Box (or Combo Box) control is returned by <List Box>.Count.
Remarks

Multi-selection List Box control

If one or more elements are selected in the List Box control, <List Box>.Modify deselects no element.
Reports and Queries

Modified element

When modifying an element containing an invisible value (specified by gStoredValue), gStoredValue must be re-used. Otherwise, this invisible value will be lost during the modification.
For example:
  • adding "MyElement":
    COMBO_MaCombo.Ajoute("MonElément" + gStoredValue("1"))
  • modifying "MyElement":
    COMBO_MaCombo.Modifie("MonNouvelElément" + gStoredValue("1"))

Miscellaneous

  • To modify an element in a Table control, use <Table>.Modify.
  • <List Box>.Modify can be used on a "Combo Box" table column.
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/13/2024

Send a report | Local help