作成日: 2018/06/25 最終更新日: 2018/06/25
文書種別
使用方法
詳細
[Tab]キーはデフォルトの設定でアクティブセルを横方向に移動するアクションが割り当てられています。このSPREADのアクションをMoveToNextCellThenControlにすることで最終セルから次のコントロールに移動し、MoveToPreviousCellThenControlにすることで先頭セルから前のコントロールに移動するようになります。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' 列数と行数の設定
FpSpread1.ActiveSheet.ColumnCount = 3
FpSpread1.ActiveSheet.RowCount = 3
Dim im As FarPoint.Win.Spread.InputMap
' 非編集セルの入力マップの設定
im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextCellThenControl)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.MoveToPreviousCellThenControl)
' 編集中セルの入力マップの設定
im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextCellThenControl)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.MoveToPreviousCellThenControl)
End Sub
' 列数と行数の設定
FpSpread1.ActiveSheet.ColumnCount = 3
FpSpread1.ActiveSheet.RowCount = 3
Dim im As FarPoint.Win.Spread.InputMap
' 非編集セルの入力マップの設定
im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextCellThenControl)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.MoveToPreviousCellThenControl)
' 編集中セルの入力マップの設定
im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextCellThenControl)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.MoveToPreviousCellThenControl)
End Sub
◎サンプルコード(C#)
private void Form1_Load(object sender, EventArgs e)
{
// 列数と行数の設定
fpSpread1.ActiveSheet.ColumnCount = 3;
fpSpread1.ActiveSheet.RowCount = 3;
FarPoint.Win.Spread.InputMap im;
// 非編集セルの入力マップの設定
im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextCellThenControl);
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.MoveToPreviousCellThenControl);
// 編集中セルの入力マップの設定
im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextCellThenControl);
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.MoveToPreviousCellThenControl);
}
{
// 列数と行数の設定
fpSpread1.ActiveSheet.ColumnCount = 3;
fpSpread1.ActiveSheet.RowCount = 3;
FarPoint.Win.Spread.InputMap im;
// 非編集セルの入力マップの設定
im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextCellThenControl);
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.MoveToPreviousCellThenControl);
// 編集中セルの入力マップの設定
im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextCellThenControl);
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.MoveToPreviousCellThenControl);
}
旧文書番号
82976