With M!Table, cells can have a button.
The following picture shows an example:
You can define buttons on column level, on cell level or on column header level with MTblDefineItemButton.
By default, buttons in cells are only shown in editing mode.
If you want to display buttons in cells ( M!Table buttons and drop down buttons ) permanently, set the table flag MTBL_FLAG_BUTTONS_PERMANENT.
If you don't want to display buttons permanently in non editable cells ( disabled or read only ), set the table flag MTBL_FLAG_HIDE_PERM_BTN_NE.
Buttons can have a text and an image, and the width can be fixed or dynamic ( the button width is then automatically adapted to the button's text and/or image ).
It's also possible to display a tooltip. See Tooltips for further details.
Hints and tips
Popup edit columns are not supported.
The button definition is additional. Existing definitions ( e.g. a drop down list column definition ) remain unchanged.
If a cell is in editing mode, the button isn't shown when the width of the edit area wouldn't be sufficient to display at least one character or - in case of a checkbox cell - the checkbox wouldn't be fully visible.
If you don't want to display buttons permanently in certain columns or cells, use the flags MTBL_COL_FLAG_HIDE_PERM_BTN and/or MTBL_CELL_FLAG_HIDE_PERM_BTN.
Please note that buttons are not permanently displayed if the flag MTBL_FLAG_BUTTONS_OUTSIDE_CELL is set.
If you want to display buttons permanently in certain columns or cells even though the flag MTBL_FLAG_HIDE_PERM_BTN_NE is set,
use the flags MTBL_COL_FLAG_SHOW_PERM_BTN_NE or MTBL_CELL_FLAG_SHOW_PERM_BTN_NE.
Please note that if a drop down cell can't go into editing mode ( e.g. because the cell is disabled ), the drop down button is never shown, regardless of the *_PERM_BTN_NE flags.
Hotkeys are only considered if the table is in cell mode.
If the focus is on a drop down cell and the drop down button is shown, pressing [ALT] + [ARROW DOWN] opens the drop down list.
Left aligned buttons
If the flag MTBL_FLAG_BUTTONS_OUTSIDE_CELL is set, left aligned buttons are displayed right aligned outside the cell.
Created with the Personal Edition of HelpNDoc: Free iPhone documentation generator