Spread Windows Forms 12.0 Product Documentation
DisplayAlignment Property
Example 


GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > GcTextBoxCellType Class : DisplayAlignment Property
Gets or sets the text alignment when displaying the horizontal axis when the control does not have input focus.
Syntax
'Declaration
 
Public Property DisplayAlignment As DisplayAlignment
'Usage
 
Dim instance As GcTextBoxCellType
Dim value As DisplayAlignment
 
instance.DisplayAlignment = value
 
value = instance.DisplayAlignment
public DisplayAlignment DisplayAlignment {get; set;}

Property Value

One of the GcTextBox.DisplayAlignment enumeration values that specifies how text is aligned in the control.
The default is DisplayAlignment.None.
Remarks
This property is used to display text with different character spacing settings. If the text of this GcTextBox is longer than this control's width, the character spacing effect disappears.
Example
This example uses the DisplayAlignment property.
GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType inputcell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType();
inputcell1.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;            
inputcell1.DisplayAlignment = GrapeCity.Win.Spread.InputMan.CellType.DisplayAlignment.Distributed;
AutoCompleteStringCollection acsc = new AutoCompleteStringCollection();
acsc.AddRange(new string[] { "One", "Two", "Three", "Four" });
inputcell1.AutoCompleteCustomSource  = acsc;
inputcell1.AutoCompleteMode = AutoCompleteMode.Suggest;
inputcell1.AutoCompleteSource = AutoCompleteSource.CustomSource;
fpSpread1.Sheets[0].Cells[1, 1].CellType = inputcell1;
Dim inputcell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType
inputcell1.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows
inputcell1.DisplayAlignment = GrapeCity.Win.Spread.InputMan.CellType.DisplayAlignment.Distributed
Dim acsc As New AutoCompleteStringCollection
acsc.AddRange(New String() {"One", "Two", "Three", "Four"})
inputcell1.AutoCompleteCustomSource = acsc
inputcell1.AutoCompleteMode = AutoCompleteMode.Suggest
inputcell1.AutoCompleteSource = AutoCompleteSource.CustomSource
fpSpread1.Sheets(0).Cells(1, 1).CellType = inputcell1
See Also

Reference

GcTextBoxCellType Class
GcTextBoxCellType Members