Monday, February 4, 2013

Example of multiline TextBox

Example of multiline TextBox

TextBox With the multi lines of TextBox, the user is able to insert text on multiple lines. The TextBox control. NET Framework in Visual Basic or C #. To make your TextBox as complete as possible, here is a small set of properties to use:
Example of multiline TextBox

Users use the Enter button to change line (carriage return). By default, this option is disabled and you must go to: True.

Tabs enrich the paragraph. No tabs, use must use space to start a paragraph. This option must be set to True.

Obviously, Multiline to True.

If the number of rows is large, vertical ScrollBars will be very helpful.

Here is a simple example from MSDN. Download the sample project available at the end of this article.

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms

Public Class Form1
    Inherits Form

    Dim textBox1 As TextBox

    Public Sub New()
    End Sub 

    Private Sub InitializeComponent()

        Me.textBox1 = New System.Windows.Forms.TextBox()
        ' textBox1 
        Me.textBox1.AcceptsReturn = True 
        Me.textBox1.AcceptsTab = True 
        Me.textBox1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.textBox1.Multiline = True 
        Me.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        ' Form1 
        Me.ClientSize = New System.Drawing.Size(284, 264)
        Me.Text = "TextBox Example" 

    End Sub 

End Class

Reference :

1 comment:

  1. This is one of those sites that is built by a web developer that dosn't realize how badly his plugins slow down the loading of site pages.
    Fucking idiot!!!!!!