Gets or sets whether the existing contents of a cell in the component
are selected when that cell enters edit mode.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property EditModeReplace As Boolean |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As FpSpread
Dim value As Boolean
instance.EditModeReplace = value
value = instance.EditModeReplace
|
| C# | |
|---|
public bool EditModeReplace {get; set;} |
Return Value
Boolean:
true if the existing text in a cell is selected when the cell enters edit mode;
false otherwise
Example
This example specifies whether the existing text in a cell is selected when the cell enters edit mode.
| C# | Copy Code |
|---|
FarPoint.Win.Spread.FpSpread fpSpread1 = new FarPoint.Win.Spread.FpSpread();
FarPoint.Win.Spread.SheetView shv = new FarPoint.Win.Spread.SheetView();
DialogResult dlg;
fpSpread1.Location = new Point(10, 10);
fpSpread1.Height = 200;
fpSpread1.Width = 400;
Controls.Add(fpSpread1);
fpSpread1.Sheets.Add(shv);
fpSpread1.ActiveSheet.SetValue(0, 0, "Replace");
dlg = MessageBox.Show("Do you want to replace the text??", "EditModeReplace", MessageBoxButtons.YesNo); if (dlg ==
DialogResult.Yes)
{
fpSpread1.EditMode = true;
fpSpread1.EditModeReplace = true;
} |
| Visual Basic | Copy Code |
|---|
Dim fpSpread1 As New FarPoint.Win.Spread.FpSpread()
Dim shv As New FarPoint.Win.Spread.SheetView()
Dim dlg As DialogResult
fpSpread1.Location = New Point(10, 10)
fpSpread1.Height = 200
fpSpread1.Width = 400
Controls.Add(fpSpread1)
fpSpread1.Sheets.Add(shv)
fpSpread1.ActiveSheet.SetValue(0, 0, "Replace")
dlg = MessageBox.Show("Do you want to replace the text??", "EditModeReplace", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
fpSpread1.EditMode = True
fpSpread1.EditModeReplace = True
End If |
Remarks
See Also