removeItem

removeItem(index: Integer);

The removeItem method of the ComboBox, ListBox, and Table classes removes an item from a combo box or list box control or removes a row from a table control for the current sheet at run time. For a combo box or list box control, if the item to be removed has subitems then these are removed as well.

The index parameter is an integer value that represents the position within the control of the item or row to be removed. The value of the index is 1 for the first row in a table control and for the first item in a list box or combo box control.

The following examples show the use of the removeItem method.

comboBoxColMoveTo.removeItem(comboBoxColMoveTo.listCount);
instancesTable.removeItem(row);    // remove from display
btnDelete_click(button: Button) updating;
vars
    emp : Employee;
begin
    emp := listBoxEmps.listObject.Employee;
    if emp.allEmployees.size <> 0 then
        app.msgBox("Employee has employees - cannot delete", "Error",
                   MsgBox_OK_Only);
        return;
    endif;
    beginTransaction;
    delete emp;
    listBoxEmps.removeItem(listBoxEmps.listIndex);
    commitTransaction;
end;