TPageControl.IndexOfTabAt function
Returns the ordinal position for the visible tab located at the specified client coordinates.
Declaration
function IndexOfTabAt(X: Integer; Y: Integer): Integer; override
function IndexOfTabAt(P: TPoint): Integer; overrideDescription
IndexOfTab is an overloaded method in
TCustomTabControl
used to get the position for a tab located at the client client coordinates.
The overloaded variants allow the client position to be specified as separate
Integer values, or as a TPoint instance where the X and Y members contain the
client-relative coordinates.
IndexOfTabAt calls the GetTabIndexAtPos method in the widgetset class to get the ordinal tab position in the return value. The return value is -1 if a tab is not visible at the specified coordinates, or when the handle has not been allocated for the widget instance.
Example Usage:
APos := TabControl1.IndexOfTabAt(TabControl1.ScreenToClient(Mouse.CursorPos));
This description is the one of ComCtrls.TCustomTabControl.IndexOfTabAt.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
