[英]TabControl Editor(TextBox) - TreeView Issue
I'm using C# ICSharpCode.TextEditor and I'm having a slight issue with, when I double click a method on the side in my TreeView box, the text should show up where you're selecting, not at the end of the line. 我正在使用C#ICSharpCode.TextEditor,但在双击TreeView框中侧面的方法时,文本应该显示在您选择的位置,而不是在行尾。
Here is my code: 这是我的代码:
private void solutionBox_DoubleClick(object sender, EventArgs e)
{
TextEditorControl editor = ActiveEditor;
if (solutionBox.SelectedNode.Text == "AddAura")
{
editor.Text += "Add()";
}
}
Now that would go to the end of my custom code in the textbox editor: 现在,这将转到文本框编辑器中我的自定义代码的结尾:
function Hello(pThis)
pThis:
endAdd()
So, what I want is when you're beside of 'pThis' and when you double click 'Add()', it will show up beside of 'pThis' & not trying to find the end of the line in the TextBox. 所以,我想要的是当您位于'pThis'旁边并双击'Add()'时,它将显示在'pThis'旁边,并且不尝试在TextBox中查找行尾。
I know '+=' is causing it, but I'd like some more options from other people. 我知道是由“ + =”引起的,但我希望其他人提供更多选择。
不知道我是否理解您..但是editor.Text是否具有Append()方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.