Functions ›› MTblSet... ››
Parent Previous Next

bOk = MTblSetDropDownListContext( hWndCol, nRow )

Sets a column's drop down list context.
If you're using type definitions on cell level ( defined with MTblDefineCellType ), you have to call this function once before any list function is called.

Window Handle: Handle of the column.

Number: Number of the row. Specify TBL_Error to set the drop down list context to the column.

Boolean: TRUE if successful or FALSE if an error occured

In this example we add 10 list entries to the drop down list of a cell:

If MTblSetDropDownListContext( hWndCol, nRow )
 Set n = 0
 While n < 10
   Call SalListAdd( hWndCol, "New list entry " || SalNumberToStrX( n, 0 ) )
   Set n = n + 1

M!Table sets the drop down list context automatically when:
- a cell goes into editing mode
- a cell is defined as drop down list with MTblDefineCellType
- a column is defined as drop down list with SalTblDefineDropDownListColumn

See also
Cell types

Created with the Personal Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites