// Please use the following namespace
// using System.Windows.Forms;
// using GrapeCity.Win.Editors;
public void CreateMultilineGcTextBox()
{
// Create an instance of a GcTextBox control.
GcTextBox gcTextBox1 = new GcTextBox();
// Set the Multiline property to true.
gcTextBox1.Multiline = true;
// Add vertical scroll bars to the GcTextBox control.
gcTextBox1.ScrollBars = ScrollBars.Vertical;
// Allow the RETURN key in the GcTextBox control.
gcTextBox1.AcceptsReturn = true;
// Allow the TAB key to be entered in the GcTextBox control.
gcTextBox1.AcceptsTab = true;
// Set WrapMode to WrapMode.WordWrap to allow text to wrap to the next line.
gcTextBox1.WrapMode = GrapeCity.Win.Editors.WrapMode.WordWrap;
// Set the default text of the control.
gcTextBox1.Text = "Power Tools!" + Environment.NewLine + "This is the second line.";
}
' Please use the following namespace
' Imports System.Windows.Forms
' Imports GrapeCity.Win.Editors
Public Sub CreateGcMultilineTextBox()
' Create an instance of a GcTextBox control.
Dim gcTextBox1 As New GcTextBox()
' Set the Multiline property to true.
gcTextBox1.Multiline = True
' Add vertical scroll bars to the GcTextBox control.
gcTextBox1.ScrollBars = ScrollBars.Vertical
' Allow the RETURN key in the GcTextBox control.
gcTextBox1.AcceptsReturn = True
' Allow the TAB key to be entered in the GcTextBox control.
gcTextBox1.AcceptsTab = True
' Set WrapMode to WrapMode.WordWrap to allow text to wrap to the next line.
gcTextBox1.WrapMode = GrapeCity.Win.Editors.WrapMode.WordWrap
' Set the default text of the control.
gcTextBox1.Text = "Power Tools!" + Environment.NewLine + "This is the second line."
End Sub