时间:2010-07-26 01:37:03

标签: c#-4.0

3 个答案:

答案 0 :(得分:42)

答案 1 :(得分:11)

我知道这是一个老问题,但我发现这也有效:

txtBox.SelectionLength = 0;

这可能比SteveCav的Select(0,0)更可取,因为它不会移动选择起点。

答案 2 :(得分:4)

试试这个:

//remove focus from control.
Apple a = new Apple();    
a.IwantThisText = "Item 1: " + 50.00 + "\r\n";    
txtBox.Text = a.IwantThisText;

// Add this
txtBox.TabStop = false;
相关问题