Spread Windows Forms 12.0 Product Documentation
Enabled Property (SideButtonBaseInfo)
Example 


GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > SideButtonBaseInfo Class : Enabled Property
Gets or sets a value that indicates whether this SideButtonBase is enabled.
Syntax
'Declaration
 
Public Property Enabled As Boolean
'Usage
 
Dim instance As SideButtonBaseInfo
Dim value As Boolean
 
instance.Enabled = value
 
value = instance.Enabled
public bool Enabled {get; set;}

Property Value

A bool value, true if enabled; otherwise, false.
The default is true.
Remarks
With the Enabled property, you can enable or disable controls at run time. For example, you can disable controls that do not apply to the current state of the application. You can also disable a control to restrict its use. For example, a button can be disabled to prevent the user from clicking it. If a control is disabled, it cannot be selected.
Example
This example sets the Enabled property.
GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo testbutton = new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo();
testbutton.BackColor = Color.Aquamarine;
testbutton.ForeColor = Color.DarkMagenta;
testbutton.UseVisualStyleBackColor = false;
testbutton.Enabled = true;
testbutton.Text = "1";

GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType dateCellType = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
dateCellType.SideButtons.Add(new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo() { Text = "A" });
this.fpSpread1_Sheet1.Columns[0].CellType = dateCellType;

GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType textCellType = new GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType();
textCellType.SideButtons.Add(new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo() { Text = "B" });
this.fpSpread1_Sheet1.Columns[1].CellType = textCellType;

GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType dateCellType2 = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
dateCellType2.SideButtons.Add(testbutton);
this.fpSpread1_Sheet1.Columns[2].CellType = dateCellType2;
Dim testbutton As New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo()
testbutton.BackColor = Color.Aquamarine
testbutton.ForeColor = Color.DarkMagenta
testbutton.UseVisualStyleBackColor = False
testbutton.Enabled = True
testbutton.Text = "1"

Dim dateCellType As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
dateCellType.SideButtons.Add(New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo() With {.Text = "A"})
fpSpread1_Sheet1.Columns(0).CellType = dateCellType

Dim textCellType = New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType()
textCellType.SideButtons.Add(New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo() With {.Text = "B"})
fpSpread1_Sheet1.Columns(1).CellType = textCellType

Dim dateCellType2 As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
dateCellType2.SideButtons.Add(testbutton)
fpSpread1_Sheet1.Columns(2).CellType = dateCellType2
See Also

Reference

SideButtonBaseInfo Class
SideButtonBaseInfo Members