Sign in Join
FPDoc Onlineexperiment

TCustomGrid.ShowCellHintWindow procedure

Member of TCustomGridprotectedIn unit Grids

Gets and displays the cell hint(s) for the current cell in the grid.

Declaration

pascal
procedure ShowCellHintWindow(APoint: TPoint)

Arguments

APoint

Client coordinates for the mouse pointer.

Description

ShowCellHintWindow is a procedure used to get and display cell hint(s) for the cell located at the position in APoint. APoint contains client-relative coordinates for the mouse pointer used to locate the cell for the hint. The values in APoint are translated to screen coordinates (using ClientToScreen) when the cell hint is displayed by the application.

Values in the Options and the CellHintPriority properties determine the text available for use as cell hints. The grid can display three types of hint: the default hint for the control (Hint property), individual cell hints (OnCellHint event), and hints for truncated cells. TCellHintPriority determines how the overall hint is combined when multiple hint texts are to be displayed.

GetCellHintText and GetTruncCellHintText are called to get the corresponding hint text(s) for the options and hint priority. AddToHint is called to apply the derived text to the values displayed in the control using its Hint property. The Application.ActivateHint method is called to display the hint window at the screen coordinates for the value in APoint.

No actions are performed in the method when:

  • ShowHints contains False,
  • The mouse pointer is not positioned over a grid cell,
  • EditorMode is True,
  • or at design-time.

ShowCellHintWindow is called from the MouseMove method, and occurs after a prior hint displayed by the application has been cancelled and the cell for the mouse pointer has has been updated in the grid cache.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.