Tooltips

With M!Table you are able to display a separate tooltip for almost every table item ( e.g. cells, column headers, column header groups, row headers, buttons etc.). Cells even have a separate tooltip for text, image and (M!Table-)button and a special tooltip that displays the complete text if the text doesn't fit into the cell.
To display a tooltip for a table item, you first have to enable the appropriate tip type with MTblEnableTipType.

Functions and messages

Functions
MTblEnableTipType / MTblIsTipTypeEnabled
MTblSetTipBackColor / MTblGetTipBackColor
MTblSetTipDelay / MTblGetTipDelay
MTblSetTipFadeInTime / MTblGetTipFadeInTime
MTblSetTipFlags / MTblQueryTipFlags
MTblSetTipFont / MTblGetTipFont
MTblSetTipFrameColor / MTblGetTipFrameColor
MTblSetTipOffset / MTblGetTipOffset
MTblSetTipOpacity / MTblGetTipOpacity
MTblSetTipPos / MTblGetTipPos
MTblSetTipRCESize / MTblGetTipRCESize
MTblSetTipSize / MTblGetTipSize
MTblSetTipText / MTblGetTipText
MTblSetTipTextColor / MTblGetTipTextColor

Messages
MTM_ShowCellTip
MTM_ShowCellBtnTip
MTM_ShowCellImageTip
MTM_ShowCellTextTip
MTM_ShowCellCompleteTextTip
MTM_ShowColHdrTip
MTM_ShowColHdrBtnTip
MTM_ShowColHdrGrpTip
MTM_ShowCornerTip
MTM_ShowRowHdrTip

Table flags
MTBL_FLAG_EXPAND_TABS

Flags

Flag

Effect if set

MTBL_TIP_FLAG_GRADIENT

The tooltip is drawn with a gradient background, beginning at the top with white and ending at the bottom with the current background color

MTBL_TIP_FLAG_NODEFFLAGS

The default flags are ignored

MTBL_TIP_FLAG_NOFRAME

The tip has no frame

MTBL_TIP_FLAG_PERMEABLE

Makes the tip "permeable" by passing all mouse messages to the table

You can't set MTBL_TIP_FLAG_NODEFFLAGS as default.
Tooltip flags and the default flags are cumulative unless you set MTBL_TIP_FLAG_NODEFFLAGS.

Types and function parameters

Constant

Type

Function parameter
hWndParam

Function parameter
nParam

MTBL_TIP_DEFAULT

Default setting

Table handle

<Ignored>

MTBL_TIP_CELL

Cell

Column handle

Row number

MTBL_TIP_CELL_TEXT

Cell's text

Column handle

Row number

MTBL_TIP_CELL_COMPLETETEXT

Cell's complete text

Column handle

Row number

MTBL_TIP_CELL_IMAGE

Cell's image

Column handle

Row number

MTBL_TIP_CELL_BTN

Cell's button

Column handle

Row number

MTBL_TIP_COLHDR

Column header

Column handle

<Ignored>

MTBL_TIP_COLHDRGRP

Column header group

Table handle

Column header group ID

MTBL_TIP_CORNER

Corner

Table handle

<Ignored>

MTBL_TIP_ROWHDR

Row header

Table handle

Row number


Hints and tips

Type MTBL_TIP_CELL_COMPLETETEXT
When the cursor is over a cell text and the text doesn't fit into the cell, the complete text is displayed in the tip, whereby the tip text is positionend exactly over the cell text.
Example:

M!Table modifies the following tip settings before sending MTM_ShowCellCompleteTextTip:
- Text: Cell text
- Position: Optimal
- Width / Height: Optimal
- Flags: MTBL_TIP_FLAG_PERMEABLE is set
- Font: Current cell text font

If the text fits into the cell, the normal cell text tip ( if any ) is shown.

Default values
If you leave a parameter undefined in a MTblSetTip* function, e.g. you pass NUMBER_Null for nDelay in MTblSetTipDelay, M!Table uses the default value.
You can set a default value by calling a MTblTipSet* function with type MTBL_TIP_DEFAULT, e.g. to set the default delay to 600 ms:

Call MTblSetTipDelay( hWndTbl, TBL_Error, MTBL_TIP_DEFAULT, 600 )

On startup ( when you call MTblSubClass ), M!Table sets the following default values:

Flags: MTBL_TIP_FLAG_PERMEABLE
Font Name: Arial
Font Size: 8
Font Enhancements: 0
Text Color: Black
Background Color: Light Yellow ( RGB: 255 255 228 )
Frame Color: Black
RCE ( Rounded Corners Ellipse ) Width: 0
RCE ( Rounded Corners Ellipse ) Height: 0
Delay: 400 ms
Fade In Time: 0
Opacity: 255

Created with the Personal Edition of HelpNDoc: Easily create Qt Help files