PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Multiselection List Box control
  • Modified element
  • Modifying an element in the browser
  • Miscellaneous
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.
Remark: <List Box>.Modify can be used on the single-selection and multiselection List Box controls.
WEBDEV - Browser code Caution: The element will be modified on the page displayed in the browser only. For more details, see Remarks.
Versions 16 and later
Linux This function is now available for WINDEV applications in Linux.
New in version 16
Linux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WINDEV applications in Linux.
Example
// Modify the element found at subscript 4 in "LIST_CustomerList"
LIST_CustomerList.Modify("Smith", 4)
Syntax
<List Box control>.Modify(<Element> [, <Element subscript>])
<List Box control>: Control name
<Element>: Character string (with quotes)
Element to modify in the specified List Box (or Combo Box) control.
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).
<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. <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 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 <List Box>.Count.
PHP <List Box>.Modify 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

Multiselection List Box control

If one or more elements are selected in the List Box control, <List Box>.Modify deselects no element.
WEBDEV - Server codeAjax

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":
    COMBO_MyCombo.Add("MyElement" + gLink("1"))
  • modifying "MyElement":
    COMBO_MyCombo.Modify("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, <List Box>.Modify must be run on the server.
Calling <List Box>.Modify in browser code is useful when using AJAX technology, in "Programmed AJAX" mode (via AJAXExecute or AJAXExecuteAsynchronous).
Reminder: In "Automatic and immediate AJAX" mode, all you have to do is switch the server process containing <List Box>.Modify to automatic AJAX mode. That's it! No additional programming is required. For more details, see AJAX.

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: wd260obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment