MTblSetDropDownListContext

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.

Parameters
hWndCol
Window Handle: Handle of the column.

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

Return
Boolean: TRUE if successful or FALSE if an error occured

Example
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

Remarks
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