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 followingthis
._applicationObject.Events.SelectionEvents.OnChange +=
new_dispSelectionEvents_OnChangeEventHandler
(SelectionEvents_OnChange);
but it seams not to react.
Best Regards,
Kai Huener
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