Spread Windows Forms 11.0 Product Documentation
Text Property (DateLiteralDisplayFieldInfo)
Example 


GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType.Fields Namespace > DateLiteralDisplayFieldInfo Class : Text Property
Gets or sets the literal text of the field.
Syntax
'Declaration
 
Public Property Text As String
'Usage
 
Dim instance As DateLiteralDisplayFieldInfo
Dim value As String
 
instance.Text = value
 
value = instance.Text
public string Text {get; set;}

Property Value

A System.String value that indicates the literal text of the display field.
The default is a space character.
Remarks
This property retrieves the literal text displayed when the GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType does not have input focus.
Example
This example uses the Text property.
GrapeCity.Win.Spread.InputMan.CellType.Fields.DateDayFieldInfo fvalue = new GrapeCity.Win.Spread.InputMan.CellType.Fields.DateDayFieldInfo();
fvalue.BackColor = Color.Lavender;
GrapeCity.Win.Spread.InputMan.CellType.Fields.DateMonthFieldInfo mvalue = new GrapeCity.Win.Spread.InputMan.CellType.Fields.DateMonthFieldInfo();
mvalue.BackColor = Color.Azure;
GrapeCity.Win.Spread.InputMan.CellType.Fields.DateYearFieldInfo yvalue = new GrapeCity.Win.Spread.InputMan.CellType.Fields.DateYearFieldInfo();
yvalue.BackColor = Color.Crimson;
GrapeCity.Win.Spread.InputMan.CellType.Fields.DateLiteralFieldInfo eday = new GrapeCity.Win.Spread.InputMan.CellType.Fields.DateLiteralFieldInfo();
eday.Text = "/";           

GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType inputcell = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
GrapeCity.Win.Spread.InputMan.CellType.Fields.DateDayDisplayFieldInfo day = new GrapeCity.Win.Spread.InputMan.CellType.Fields.DateDayDisplayFieldInfo();
day.ShowLeadingZero = true;
GrapeCity.Win.Spread.InputMan.CellType.Fields.DateMonthDisplayFieldInfo month = new GrapeCity.Win.Spread.InputMan.CellType.Fields.DateMonthDisplayFieldInfo();
month.ShowLeadingZero = true;
GrapeCity.Win.Spread.InputMan.CellType.Fields.DateYearDisplayFieldInfo year = new GrapeCity.Win.Spread.InputMan.CellType.Fields.DateYearDisplayFieldInfo();
year.ShowLeadingZero = true;
GrapeCity.Win.Spread.InputMan.CellType.Fields.DateLiteralDisplayFieldInfo lday = new GrapeCity.Win.Spread.InputMan.CellType.Fields.DateLiteralDisplayFieldInfo();
lday.Text = "/";
inputcell.DisplayFields.Add(month);
inputcell.DisplayFields.Add(lday);
inputcell.DisplayFields.Add(day);
inputcell.DisplayFields.Add(lday);
inputcell.DisplayFields.Add(year);

inputcell.Fields.Clear();
inputcell.Fields.Add(mvalue);
inputcell.Fields.Add(eday);
inputcell.Fields.Add(fvalue);
inputcell.Fields.Add(eday);
inputcell.Fields.Add(yvalue);
fpSpread1.Sheets[0].Cells[1, 1].CellType = inputcell;
Dim fvalue As New GrapeCity.Win.Spread.InputMan.CellType.Fields.DateDayFieldInfo()
fvalue.BackColor = Color.Lavender
Dim mvalue As New GrapeCity.Win.Spread.InputMan.CellType.Fields.DateMonthFieldInfo()
mvalue.BackColor = Color.Azure
Dim yvalue As New GrapeCity.Win.Spread.InputMan.CellType.Fields.DateYearFieldInfo()
yvalue.BackColor = Color.Crimson
Dim eday As New GrapeCity.Win.Spread.InputMan.CellType.Fields.DateLiteralFieldInfo()
eday.Text = "/"

Dim inputcell As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
Dim day As New GrapeCity.Win.Spread.InputMan.CellType.Fields.DateDayDisplayFieldInfo()
day.ShowLeadingZero = True
Dim month As New GrapeCity.Win.Spread.InputMan.CellType.Fields.DateMonthDisplayFieldInfo()
month.ShowLeadingZero = True
Dim year As New GrapeCity.Win.Spread.InputMan.CellType.Fields.DateYearDisplayFieldInfo()
year.ShowLeadingZero = True
Dim lday As New GrapeCity.Win.Spread.InputMan.CellType.Fields.DateLiteralDisplayFieldInfo()
lday.Text = "/"
inputcell.DisplayFields.Add(month)
inputcell.DisplayFields.Add(lday)
inputcell.DisplayFields.Add(day)
inputcell.DisplayFields.Add(lday)
inputcell.DisplayFields.Add(year)

inputcell.Fields.Clear()
inputcell.Fields.Add(mvalue)
inputcell.Fields.Add(eday)
inputcell.Fields.Add(fvalue)
inputcell.Fields.Add(eday)
inputcell.Fields.Add(yvalue)
fpSpread1.Sheets(0).Cells(1, 1).CellType = inputcell
See Also

Reference

DateLiteralDisplayFieldInfo Class
DateLiteralDisplayFieldInfo Members