c#中textbox属性_C#.Net中带有示例的TextBox.Multiline属性

c#中textbox属性

Here we are demonstrating use of Multiline property of the TextBox Control.

在这里,我们演示了TextBox控件Multiline属性的使用。

Multiline property contains two values:

多行属性包含两个值:

  1. True: We can enter text in more than one line

    正确 :我们可以输入多行文字

  2. False: We can enter text in only single line

    False :我们只能在一行中输入文本

By default this is False.

默认情况下为False。

Example:

例:

TextBox.Multiline Property with Example in C#.Net

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”快捷键为所选控件打开属性窗口。

TextBox.Multiline Property with Example in C#.Net

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属性

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值