TCustomControlBar.MouseToBandPos function
Gets the visible band on the control bar at the specified mouse coordinates.
Declaration
function MouseToBandPos(X: Integer; Y: Integer; out AGrabber: Boolean)
: TCtrlBandArguments
X | Horizontal coordinate for the mouse pointer. |
Y | Vertical coordinate for the mouse pointer. |
AGrabber | True if the mouse coordinates are over the grabber decoration on the band. |
Function result
TCtrlBand instance at the specified coordinates, or Nil when the coordinates are not on a visible band.
Description
MouseToBandPos iterates over the visible bands in the control to
find the TCtrlBand instance which is under the coordinates specified in X and
Y. The return value is
Nil if a band is not found under the specified
coordinates.
AGrabber is a
Boolean output argument used to indicate
whether the coordinates are over the grabber decoration on the control. Its
value is
False if a band was not found, or the value in Y is greater
than the largest bottom property in the list of visible bands.
Perhaps this should have been named MousePosToBand.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
