PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Multi-selection list box
  • Modified element
  • Modifying an element in the browser
  • Various
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
Modifies an element in a memory List Box control (standard list box or listview) or in a memory Combo Box control.
Note: ListModify can be used on the single-selection and multi-selection List Box controls.
WEBDEV - Browser code Caution: The element will be modified on the page displayed in the browser only. See Remarks for more details.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Modify the element found at subscript 4 in "LIST_CustomerList"
ListModify(LIST_CustomerList, "Moore", 4)
WINDEVReports and QueriesWindows MobileUser code (UMC)
// Modify the image found at subscript 4 in "LSV_Diving"
ListModify(LSV_Diving, "Coral Reef", "C:\MyImages\CoralReef.JPG", 4)
Syntax
ListModify(<List Box Control> , <Element> [, <Image> [, <Element Subscript>]])
<List Box Control>: Control name
Name of control to use:
  • List Box control,
  • Combo Box control.
If this parameter corresponds to an empty string (""), the element is modified in the List Box (or Combo Box) control to which the current process belongs.
WEBDEV - Browser code The name of List Box or Combo Box control to use must necessarily be specified.
<Element>: Character string (with quotes)
Element to modify in the specified List Box (or Combo Box) control.
WINDEVWindows MobileJava For a ListView control, this parameter corresponds to the image caption.
WEBDEV - Server codeWEBDEV - Browser codePHP The Carriage Return characters (CR) and the tabulations (TAB) are not supported.
WEBDEV - Server code To add several consecutive spaces, non-breakable space characters must be used: Charact(160).
<Image>: Optional character string (with quotes)
Name and path of image that will be added into a ListView control. This parameter is taken into account for the ListView controls displayed in ListView mode only.
If this parameter is not specified, the default image (defined in the "Details" tab in the description window of control) will be used.
WEBDEV - Server codeWEBDEV - Browser codeAndroidiPhone/iPadUniversal Windows 10 AppPHP This parameter is not available.
<Element Subscript>: Optional integer
Subscript of element to modify.
If this parameter:
  • is not specified or if it is set to -1, the current element is modified. ListModify has no effect if there is no current element.
  • is equal to 0, the first element is modified.
  • is greater than the number of elements found in the List Box (or Combo Box) control, a WLanguage error occurs. The number of elements found in a List Box (or Combo Box) control is returned by ListCount.
PHP ListModify has no effect if this parameter is equal to 0 or if it is greater than the number of elements found in the List Box (or Combo Box) control.
Remarks

Multi-selection list box

If one or more elements are selected in the List Box control, ListModify deselects no element.
WINDEVWEBDEV - Server codeReports and QueriesAndroidiPhone/iPadWindows MobileJavaAjaxUser code (UMC)

Modified element

When modifying an element containing an invisible value (specified by gLink), gLink must be re-used. Otherwise, this invisible value will be lost during the modification.
For example:
  • adding "MyElement":
    ListAdd(COMBO_MyCombo, "MyElement" + gLink("1"))
  • modifying "MyElement":
    ListModify(COMBO_MyCombo, "MyNewElement" + gLink("1"))
WEBDEV - Browser code

Modifying an element in the browser

When modifying an element in browser code, this element is modified only for the page displayed in the browser. In order for this element to be modified on the server, ListModify must be run on the server.
The call to ListModify in browser code is convenient when using the AJAX technology, in "Programmed AJAX" mode (using AJAXExecute or AJAXExecuteAsynchronous).
Reminder: In "Automatic and immediate AJAX" mode, all you have to do is switch the server process containing ListModify to automatic AJAX mode. That's it! No additional programming is required. See AJAX for more details.

Various

  • To modify an element in a Table control, use TableModify.
  • ListModify can be used on a "Combo box" table column.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo ListModify
ListModify(LIST_List,"Modificando Segundo",2)

// Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/11/aula-963-curso-windev-listbox-008.html
https://www.youtube.com/watch?v=09j73FXGrjE



De matos
Dec. 04 2016