HI,
I have a TextEditor control sitting beside a Treeview. The latter holds a map of areas of the text currently shown in theTextEditor. When the Treeview map is left-clicked, I move the cursor position in the Text Editor to a specific line in the Text depending on which Treeview node was clicked. This all works fine except that the cursor disappears from the TextEditor's text pane as soon as it loses focus and I can't get it to show. The text scrolls to the new current line just fine, but there is no cursor. I have tried various things inclusing giving focus back to theTextEditor after handling theTreeview click, as follows:
within the event-handler for the click on Treeview node is the following code...
textEditor.ActiveTextArea.TextArea.Caret.Line = <new line number>;
textEditor.ActiveTextArea.TextArea.Caret.Column = 0;
textEditor.ActiveTextArea.TextArea.Focus();
I've also tried calling the Focus() method on textEditor itself, and on ActivateTextArea, still no cursor will appear. I've also tried calling Refresh() for each control too, but I simply cannot get the TextEditor to show the current cursor unless I click within its active text, and that click is moving the cursor away from where I've carefully placed it, which is not what I want.
Please help.