Mirror TextBox Text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • starlight849
    New Member
    • Jun 2009
    • 82

    #1

    Mirror TextBox Text

    Hi guys and gals,
    I appreciate any help in advance.
    I have two textbox controls and I want to accept input for textbox 1 and textbox 2. However, when user enters text into textbox 1 I would like textbox 2 to mirror the same text as it is typed.
    I am sure this is a very simple procedure however it is new to me and I am having trouble finding an answer with search engines. Most result are coming back as text that one can read backwards in a mirror which is not what I am looking for.

    Thanks,
    Starlight849
  • Christopher Nigro
    New Member
    • Jul 2010
    • 53

    #2
    Basically:

    Code:
     public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
                this.textBox1.KeyUp += new KeyEventHandler(textBox1_KeyUp);
            }
    
            void textBox1_KeyUp(object sender, KeyEventArgs e)
            {
                textBox2.Text = textBox1.Text;
            }
        }

    Comment

    Working...