Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将组合框中的信息复制到文本框中?我希望它实时完成,所以一旦在组合框中选择了一个项目,它就会出现在文本框中
cboGender.SelectedText = txtGender.Text 试过了
如果您尝试将 a 复制Text到ComboBoxa TextBox,则您提供的代码是向后的。但真正的答案是,不要使用ComboBox.SelectedText; 采用ComboBox.Text
Text
ComboBox
TextBox
ComboBox.SelectedText
ComboBox.Text
txtGender.Text = cboGender.Text