DELETEITEM
7.8.5, PLBCMP GUI Only
The DELETEITEM instruction removes a menu line from a list object. It also deletes text from an EDITTEXT object. It uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A previously defined and created object or object pointer containing an item to delete.
item
Optional. A Numeric Variable, Expression, or decimal constant that indicates the item within the object.
dialog
Required. A previously defined and created DIALOG object or dialog object pointer containing an object from which an item is deleted.
dialog-no
Required. A Numeric Variable, Literal, or Expression that contains the dialog item number of the COMBOBOX, POPUPMENU or DATALIST dialog item from which an item is deleted.
Flags Affected: NONE
Note the following:
All items below the item removed have their item number reduced by one.
No action occurs if {item} is less than one for the following objects: FLOATMENU, MENU, or SUBMENU.
No action occurs if {item} is greater than the number of items in the object for the following objects: COMBOBOX, FLOATMENU, MENU, POPUPMENU or SUBMENU.
All items are deleted if {item} is zero for a COMBOBOX, DATALIST or POPUPMENU object.
All text is deleted if {item} is zero for an EDITTEXT object.
All selected text is deleted if {item} is one for an EDITTEXT object.
Format 2 is used if the DELETEITEM instruction is executed for a DIALOG object. The {dialog-no} operand contains the dialog item number of the COMBOBOX, POPUPMENU or DATALIST dialog item. If the dialog number is not for a COMBOBOX, POPUPMENU or DATALIST dialog item, a runtime error of O107 is generated.
An object must be CREATEd before using DELETEITEM. If this is not done, a runtime error of O105 is generated.
See Also: Example Code, INSERTITEM, Object Instructions
![]() |