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. 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!!!!!!

  2. We at COEPD glad to announce that we have introduced Dot Net Technologies Internship Programs (Self sponsored) for professionals who want to have hands on experience. This program is available in COEPD Hyderabad premises which is accompanied by IT Companies. It is intelligently dedicated to our firm participants predominantly acknowledging and appreciating the fact that they are on the path of making a career in Dot Net Technologies discipline. We assume Object-Oriented Programming concepts and teaches C#.NET, ADO.NET which helps the interns to build database-driven Web applications and Web Sites successfully. This internship is designed to gain theoretical knowledge and also hands-on practice and practical know-how to master the nitty-gritty of the Dot Net developer profession. More than a training institute, COEPD today stands differentiated as a mission to help you "Build your dream career" - COEPD way.