System.Windows.Forms.TextBox.Paste C# (CSharp) Method

Paste() public method

public Paste ( string text ) : void
text string
return void
		public void Paste (string text)
		{
			m_helper.SelectedText = text;
			//document.ReplaceSelection (CaseAdjust (text), false);

			//ScrollToCaret();
			OnTextChanged(EventArgs.Empty);
		}
	

Usage Example

Example #1
0
File: Form1.cs Project: Gwee/csharp
        private void Button_Click(object sender, System.EventArgs e)
        {
            Button btn = (Button)sender;
            string str = btn.Text;

            switch (str)
            {
            case "Copy":
                if (TextBox1.SelectionLength > 0)
                {
                    TextBox1.Copy();
                }
                break;

            case "Cut":
                if (TextBox1.SelectionLength > 0)
                {
                    TextBox1.Cut();
                }
                break;

            case "Paste":
                TextBox1.Paste();
                break;

            case "Undo":
                TextBox1.Undo();
                break;
            }
        }
All Usage Examples Of System.Windows.Forms.TextBox::Paste