GrapeCity SPREAD for Windows Forms 11.0J
FocusPosition プロパティ (GcTimeSpanCellType)


エディタがフォーカスを取得したときの初期カーソル位置を取得または設定します。
構文
'Declaration
 
Public Property FocusPosition As FieldsEditorFocusCursorPosition
'使用法
 
Dim instance As GcTimeSpanCellType
Dim value As FieldsEditorFocusCursorPosition
 
instance.FocusPosition = value
 
value = instance.FocusPosition
public FieldsEditorFocusCursorPosition FocusPosition {get; set;}
次のサンプルコードは、GcTimeSpanセルを作成します。
GrapeCity.Win.Spread.InputMan.CellType.GcTimeSpanCellType gc = new GrapeCity.Win.Spread.InputMan.CellType.GcTimeSpanCellType();
gc.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
gc.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter;

gc.AlternateText.DisplayNull.ForeColor = Color.Red;
gc.AlternateText.DisplayNull.Text = "Display Null";
gc.AlternateText.Null.ForeColor = Color.Red;
gc.AlternateText.Null.Text = "Null value";
gc.AlternateText.DisplayZero.Text = "Display Zero";
gc.AlternateText.DisplayZero.ForeColor = Color.AliceBlue;
gc.AlternateText.Zero.Text = "Zero";
gc.AlternateText.Zero.ForeColor = Color.Azure;

gc.EditMode = GrapeCity.Win.Spread.InputMan.CellType.EditMode.Overwrite;
gc.ExitOnLastChar = true;

gc.Fields.Clear();
gc.Fields.AddRange("d.hh:mm:ss,7,.,,,-,");
gc.DisplayFields.Clear();
gc.DisplayFields.AddRange("d.hh:mm:ss,7,.,,,-,");
gc.DefaultActiveField = gc.Fields[1];

gc.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.FieldsEditorFocusCursorPosition.SelectAll;
gc.MaxMinBehavior = GrapeCity.Win.Spread.InputMan.CellType.MaxMinBehavior.Clear;

gc.NegativeColor = Color.Chocolate;
gc.PaintByControl = true;
gc.ShowRecommendedValue = true;

gc.SideButtons.Add(new GrapeCity.Win.Spread.InputMan.CellType.SpinButtonInfo());
gc.Spin.AllowSpin = true;
gc.Spin.Increment = 1;
gc.Spin.SpinOnKeys = true;
gc.Spin.SpinOnWheel = true;
gc.Spin.Wrap = true;

gc.UseNegativeColor = true;
gc.ValidateMode = GrapeCity.Win.Spread.InputMan.CellType.ValidateMode.ValidateNone;
gc.ValueSign = GrapeCity.Win.Spread.InputMan.CellType.ValueSignControl.Positive;
gc.UseSpreadDropDownButtonRender = true;

fpSpread1.ActiveSheet.Cells[0, 0].CellType = gc;
Dim GC As New GrapeCity.Win.Spread.InputMan.CellType.GcTimeSpanCellType()
GC.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows
GC.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter

GC.AlternateText.DisplayNull.ForeColor = Color.Red
GC.AlternateText.DisplayNull.Text = "Display Null"
GC.AlternateText.Null.ForeColor = Color.Red
GC.AlternateText.Null.Text = "Null value"
GC.AlternateText.DisplayZero.Text = "Display Zero"
GC.AlternateText.DisplayZero.ForeColor = Color.AliceBlue
GC.AlternateText.Zero.Text = "Zero"
GC.AlternateText.Zero.ForeColor = Color.Azure

GC.EditMode = GrapeCity.Win.Spread.InputMan.CellType.EditMode.Overwrite
GC.ExitOnLastChar = True

GC.Fields.Clear()
GC.Fields.AddRange("d.hh:mm:ss,7,.,,,-,")
GC.DisplayFields.Clear()
GC.DisplayFields.AddRange("d.hh:mm:ss,7,.,,,-,")
GC.DefaultActiveField = GC.Fields(1)

GC.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.FieldsEditorFocusCursorPosition.SelectAll
GC.MaxMinBehavior = GrapeCity.Win.Spread.InputMan.CellType.MaxMinBehavior.Clear

GC.NegativeColor = Color.Chocolate
GC.PaintByControl = True
GC.ShowRecommendedValue = True

GC.SideButtons.Add(New GrapeCity.Win.Spread.InputMan.CellType.SpinButtonInfo())
GC.Spin.AllowSpin = True
GC.Spin.Increment = 1
GC.Spin.SpinOnKeys = True
GC.Spin.SpinOnWheel = True
GC.Spin.Wrap = True

GC.UseNegativeColor = True
GC.ValidateMode = GrapeCity.Win.Spread.InputMan.CellType.ValidateMode.ValidateNone
GC.ValueSign = GrapeCity.Win.Spread.InputMan.CellType.ValueSignControl.Positive
GC.UseSpreadDropDownButtonRender = True

FpSpread1.ActiveSheet.Cells(0, 0).CellType = GC
参照

GcTimeSpanCellType クラス
GcTimeSpanCellType メンバ

 

 


© 2004-2018, GrapeCity Inc. All rights reserved.