Select-Event in code editor

Hi all,

My question is for Visual Studio 2005. I have a custom tool window and I want to send it the current position (codeElement) of the cursor. Which Event do I have to use? I tried to use the following

this._applicationObject.Events.SelectionEvents.OnChange +=
new_dispSelectionEvents_OnChangeEventHandler
(
SelectionEvents_OnChange);

but it seams not to react.

Best Regards,
Kai Huener

[699 byte] By [KaiHuener] at [2007-12-17]
# 1
It looks like you are trying to use the SelectionEvents event to capture when the caret moves about within the text document. However, this event is used to fire when selection is changed within the solution explorer. Currently, there is no way to capture when the caret moves within a text buffer, the only possible way is to set a timer and check where the caret is periodically.

Craig

CraigSkibo at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Extensibility...

Visual Studio

Site Classified