
Hi,
I would like ask about the selection changed event please. I have a control that contains Syntax Editor, and would like to register with its selection-changed event. I noticed the event is based on the view rather than the Syntax Editor object itself.
So two questions please:
1)
How to register with this event - i guess its a case of:
mySyntaxEditor.ActiveView.SelectionChanged += new EventHandler<EditorViewSelectionEventArgs>(this.OnViewSelectionChanged);
Would that be the typical method, or is there a better way?
2) If there is a 4-way split, how to register only with the active view as im only interested in the selection changes of the active pane of the splitter?
If the only way is to register with all views, then how would i know which view the selection has changed within when the handler is called, and how would i register for all views within the splitter as im unsure when they will be split/unsplit?
Thanks!
James
I would like ask about the selection changed event please. I have a control that contains Syntax Editor, and would like to register with its selection-changed event. I noticed the event is based on the view rather than the Syntax Editor object itself.
So two questions please:
1)
How to register with this event - i guess its a case of:
mySyntaxEditor.ActiveView.SelectionChanged += new EventHandler<EditorViewSelectionEventArgs>(this.OnViewSelectionChanged);
Would that be the typical method, or is there a better way?
2) If there is a 4-way split, how to register only with the active view as im only interested in the selection changes of the active pane of the splitter?
If the only way is to register with all views, then how would i know which view the selection has changed within when the handler is called, and how would i register for all views within the splitter as im unsure when they will be split/unsplit?
Thanks!
James