Tech Tip: Utility to clear listbox
PRODUCT: 4D | VERSION: 15.x | PLATFORM: Mac & Win
Published On: July 6, 2017
Below is an utility method to help clear listboxes. This will delete all the columns in the listbox
// Method: UTIL_CLEAR_LB // Parameters: // $1 - Pointer to listbox C_POINTER($lb;$1) C_LONGINT($numCols;$i) $lb:=$1 $numCols:=LISTBOX Get number of columns($lb->) For ($i;$numCols;1;-1) LISTBOX DELETE COLUMN($lb->;$i) End for CLEAR VARIABLE($lb->) |
Example of usage:
UTIL_CLEAR_LB(->myListBox) |