关于文本框控件的问题 [英] question about text box control
本文介绍了关于文本框控件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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 theTextBox
at runtime.
Sample :
Private Sub Form_Load ()
Text1.Text = "This is an example"
Text1.Text = Text1.Text & " of VB textbox sample."
End Sub
这篇关于关于文本框控件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文