c#中textbox属性
Here we are demonstrating use of Multiline property of the TextBox Control.
在这里,我们演示了TextBox控件的Multiline属性的使用。
Multiline property contains two values:
多行属性包含两个值:
True: We can enter text in more than one line
正确 :我们可以输入多行文字
False: We can enter text in only single line
False :我们只能在一行中输入文本
By default this is False.
默认情况下为False。
Example:
例:
In this example, we took a Windows form that contains a textbox named txtInput, we can change name of the control using name property. And we set Multiline property to True using property window, we can open property window using "F4" short-cut key for selected control.
在此示例中,我们采用Windows窗体,其中包含一个名为txtInput的文本框,我们可以使用name属性更改控件的名称。 然后,使用属性窗口将Multiline属性设置为True ,可以使用“ F4”快捷键为所选控件打开属性窗口。
We can change this property using code:
我们可以使用以下代码更改此属性:
private void Form1_Load(object sender, EventArgs e)
{
textInput.Multiline = true;
}
翻译自: https://www.includehelp.com/dot-net/textbox-multiline-property-with-example.aspx
c#中textbox属性