コード例 #1
0
 public static void AppendText(TextBoxBase tb, string text)
 {
     if (tb == null) return;
     tb.SuspendLayout();
     tb.SelectionStart = tb.TextLength;
     tb.SelectedText = text;
     tb.ResumeLayout();
 }
コード例 #2
0
 public static void AppendText(TextBoxBase tb, string text)
 {
     if (tb == null) return;
     tb.SuspendLayout();
     if (tb.InvokeRequired)
     {
         tb.Invoke(new AppendTextDelegate(AppendText), new object[] { tb, text });
     }
     else
     {
         tb.SelectionStart = tb.TextLength;
         tb.SelectedText = text;
     }
     tb.ResumeLayout();
 }