ITEM_INSERT

ITEM_INSERT N,L,T

INSERTS THE ITEM T AFTER THE LINE L IN THE SYSTEM OBJECT NUMBER N

  • Type: Command
  • Parameters: 3
  • Group: System Objects

ACTION

The command ITEM_INSERT N,L,T adds the text T as line (item) after the line number L in the system object designated by its number N.

The system object is : MEMO, MEMO_RICH, COMBO, LIST, DLIST, SYNEDIT.

Remark: the first line has the number 1.

SYNTAX: ITEM_INSERT N,L,T

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • L = number of Line (integer or real). Must be greater than 0. (1 is the first line)
  • T = text to be added in the system object.

USE

  • The command ITEM_INSERT is used to insert a line in an objet handling text.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If the object number N is not of type : MEMO, MEMO_RICH, COMBO, LIST, DLIST, SYNEDIT.
  • If number L is not a correct expression.
  • If number L is less than 0.
  • If text T is not a correct expression.

EXAMPLE

rem create a LIST

list 1:width 1,150

rem fill the LIST with 2 lines

item_add 1,"This is line 2"

item_add 1,"This is line 3"

rem wait for 1 second

wait 1000

rem insert a line at first position

item_insert 1,1,"This is first line"

SEE ALSO

MEMO

MEMO_RICH

COMBO

LIST

DLIST

SYNEDIT

FILE_ADD

ITEM_ADD

ITEM_DELETE

ITEM_SELECT

ITEM_INDEX$()

ITEM_INDEX()

ITEM_INDEX$()

ITEM_READ$()

COUNT()