如何更改文本框值

问题描述 投票:0回答:1

我在下面使用了 textchanged 事件

     private void Textbox1_TextChanged(object sender, EventArgs e)
 {
     
     if (Combobox1.SelectedIndex == 7)
     {
         Textbox2.Text = Textbox1.Text.ToString();
     }
 }

Textbox1 值到 Textbox2,但我无法在文本框 2 中键入内容。

c# textbox
1个回答
0
投票

您可以相应地更改 TextBox Valur。

private void Textbox1_TextChanged(object sender, EventArgs e)
 {
      
         Textbox2.Text = Textbox1.Text;
 }
© www.soinside.com 2019 - 2024. All rights reserved.