DevExpress MemoEdit定位到末尾

   1: /// 
   2: /// 追加文本到MemoEdit中
   3: /// 
   4: /// 
   5: /// 
   6: public static void AppendTextToMemoEdit(MemoEdit memoEdit, string strText)
   7: {
   8:     try
   9:     {
  10:         memoEdit.Text = memoEdit.Text + "\r\n" + strText;
  11:         memoEdit.SelectionStart = memoEdit.Text.Length;
  12:         memoEdit.ScrollToCaret();
  13:         Application.DoEvents();
  14:     }
  15:     catch
  16:     {
  17:         return;
  18:     }
  19: }

如果是TextBox控件,可以用 TextBox.AppentText()方法。

你可能感兴趣的:(DevExpress MemoEdit定位到末尾)