[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TTabControl.IndexOfTabAt

Gets the position for the tab at the specified mouse coordinates.

Declaration

Source position: comctrls.pp line 851

public function TTabControl.IndexOfTabAt(

  X: Integer;

  Y: Integer

):Integer; override;

function TTabControl.IndexOfTabAt(

  P: TPoint

):Integer; override;

Arguments

X

  

Horizontal coordinate for the mouse pointer.

Y

  

Vertical coordinate for the mouse pointer.

Function result

Ordinal position for the hovered tab in the Tabs property.

Arguments

P

  

TPoint instance with the mouse coordinates.

Description

IndexOfTabAt is an overridden overloaded Integer function used to get the position for the tab at the specified mouse coordinates. The overloaded variants allow the mouse coordinates to be specified as a TPoint instance, or two Integer values.

IndexOfTabAt re-implements the methods from the ancestor class to use the TTabControlNoteBookStrings instance in Tabs. Tabs provides the offset for the control from the value in ClientOrigin. The IndexOfTabAt method in Tabs is called to get the return value for the method.

The return value contains the ordinal position in Tabs where the mouse pointer is located.

See also

TCustomTabControl.IndexOfTabAt

  

Returns the ordinal position for the visible tab located at the specified client coordinates.


Version 3.2 Generated 2024-02-25 Home