[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Returns the ordinal position for the visible tab located at the specified client coordinates.
Source position: comctrls.pp line 450
protected function TCustomTabControl.IndexOfTabAt( |
X: Integer; |
Y: Integer |
):Integer; virtual; overload; |
P: TPoint |
):Integer; virtual; overload; |
X |
|
Horizontal client coordinate for the tab position located in the method. |
Y |
|
Vertical client coordinate for the tab position located in the method. |
Ordinal position in Tabs for the visible tab located at the specified coordinates, or -1 when not found or available.
P |
|
TPoint instance with the client coordinates for the requested tab index. |
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));
Version 4.0 | Generated 2025-05-03 | Home |