本文介绍了关于文本框控件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
textbox.text属性的目的是什么
what is the purpose of textbox.text property
推荐答案Text属性允许您获取和设置用户将输入的值,或者查看。 例如: The Text property allows you to get and set the value that the user will enter, or see. For example: Console.WriteLine(myTextBox.Text);
将打印用户输入的值并:
Would print the value the user entered and:
myTextBox.Text = "Default value";将默认值放入框中,这样用户就不必总是输入任何内容。
Would put a default into the box so the user didn't always have to type anything.
An另外还有OriginalGriff的回答: 文本属性指定要在 TextBox 中显示的文本在运行时。 样本: An addition with OriginalGriff's answer : Text property specifies the text to be displayed in the TextBox at runtime. Sample : Private Sub Form_Load () Text1.Text = "This is an example" Text1.Text = Text1.Text & " of VB textbox sample." End Sub
更多推荐
关于文本框控件的问题
发布评论