📜  c# winforms 文本框光标位置 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:18.598000             🧑  作者: Mango

代码示例1
//If you want to put the cusror at the end of text use this:
TextBox1.SelectionStart = TextBox1.Text.Length;
TextBox1.SelectionLength = 0;
// Or use this for custom location int CustomIndex 
TextBox1.SelectionStart = CustomIndex;
TextBox1.SelectionLength = 0;