bOk = MTblDefineButtonColumn( hWndCol, bShow, nWidth, sText, nImage, nFlags )

Deprecated, please use MTblDefineItemButton instead.

Defines a column as a button column. That means, if a cell of a button column gets the focus, a right aligned button like this is shown:

If the user clicks the button, the message MTM_BtnClick is sent to the table.

Parameters
hWndCol
Window Handle: Handle of the column.

bShow
Boolean: TRUE = button is visible, FALSE = button is hidden

nWidth
Number: Width of the button in pixels. If you specify -1, the witdh of the button is adapted to the button's text and/or image.

sText
String: Button text.

nImage
Number: Handle of the image to display. Specify 0 to display no image.

nFlags
Number: Any combination of button flags

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

Example
In this example the first column is defined as button column. The button is visible, has a dynamic width, the text is "...", has no image and the font is shared:

Call MTblDefineButtonColumn( SalTblGetColumnWindow( hWndTbl, 1, COL_GetPos ), TRUE, -1, "...", 0, MTBL_BTN_SHARE_FONT ) 

Remarks
Popup edit columns are not supported.
The button definition is additional. Existing definitions ( e.g. a drop down list column definition ) remain unchanged.
For nImage you have to use handles returned by M!Image functions. Handles returned by VicPicLoad or by API functions can't be used.

See also
Buttons

Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation