Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxCustomNavBar.GetLinkAtSelectedPos(TPoint) Method

Returns the link whose caption or image is located under the specified point.

#Declaration

Delphi
function GetLinkAtSelectedPos(const pt: TPoint): TdxNavBarItemLink;

#Parameters

Name Type
pt TPoint

#Returns

Type
TdxNavBarItemLink

#Remarks

When designing applications that use the NavBar control you may need to determine which element of the control is under the specified point. In particular, you may need to find out whether a specific point is over a link and retrieve the link. This can be used to display appropriate information within the status bar when a link is hovered over or invoke a context menu if a link is clicked, for instance. In this case, you should use the GetLinkAtSelectedPos or GetLinkAtPos functions to identify the link under the mouse cursor.

The GetLinkAtSelectedPos function returns the link whose caption or image is located under the specified point. If the pt parameter specifies a point over a link’s caption or image, it returns the corresponding link. Otherwise, nil is returned. Note that the point must be specified in the control’s client coordinates.

The GetLinkAtPos function acts in a similar way. The only difference is that it returns the link if the specified point is within the link’s bounding rectangle but not necessarily within the image or caption area. Please refer to the GetLinkAtPos function description for details.

See Also