Spread Windows Forms 10.0 Product Documentation
ScrollBarMode Property (GcTextBoxCellType)
Example 


Gets or sets how to display the scroll bars.
Syntax
'Declaration
 
Public Property ScrollBarMode As ScrollBarMode
'Usage
 
Dim instance As GcTextBoxCellType
Dim value As ScrollBarMode
 
instance.ScrollBarMode = value
 
value = instance.ScrollBarMode
public ScrollBarMode ScrollBarMode {get; set;}

Property Value

One of the GcTextBox.ScrollBarMode enumeration values that indicates whether the scroll bars are displayed as soon as the contents exceed the length of the control.
The default is ScrollBarMode.Fixed.
Remarks
To display the scroll bars, you must have the GcTextBox.Multiline property set to true. If set to ScrollBarMode.Fixed, the scroll bars are displayed all the time. If set to ScrollBarMode.Automatic, the scroll bars are visible only when the contents in the control exceed the length of the control.
Example
This example uses the ScrollBarMode property.
GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType textcell = new GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType();
textcell.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.EditorBaseFocusCursorPosition.MouseLocation;
textcell.GridLine = new GrapeCity.Win.Spread.InputMan.CellType.Line(GrapeCity.Win.Spread.InputMan.CellType.LineStyle.Dashed, Color.DarkGreen);
textcell.LineSpace = 2;
textcell.ScrollBarMode = GrapeCity.Win.Spread.InputMan.CellType.ScrollBarMode.Automatic;
textcell.ScrollBars = ScrollBars.Both;
textcell.Multiline = true;
fpSpread1.Sheets[0].Cells[0, 0].CellType = textcell;
Dim textcell As New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType()
textcell.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.EditorBaseFocusCursorPosition.MouseLocation
textcell.GridLine = New GrapeCity.Win.Spread.InputMan.CellType.Line(GrapeCity.Win.Spread.InputMan.CellType.LineStyle.Dashed, Color.DarkGreen)
textcell.LineSpace = 2
textcell.ScrollBarMode = GrapeCity.Win.Spread.InputMan.CellType.ScrollBarMode.Automatic
textcell.ScrollBars = ScrollBars.Both
textcell.Multiline = True
FpSpread1.Sheets(0).Cells(0, 0).CellType = textcell
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

GcTextBoxCellType Class
GcTextBoxCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.