Firstly, you should Obtain the Document Position under the Mouse Cursor. Then, utilize the SubDocument.GetText Method to get a text within specified ranges several times until this text represents a whole word. Note also that it is very important to utilize the DocumentPosition.BeginUpdateDocument Method. This allows you to distinguish between different parts of the document, such as header, footer or body.
Starting with version 16.1, the HitTestManager class is provided. Using this class, it's possible to obtain document layout elements located under the specific point and display information about this element in the ToolTip.
Refer to the How to show a ToolTip containing information about the document layout element located under the cursor position example illustrating this approach.
↧
How to display a ToolTip when hovering with the mouse over a particular word
↧