コンボボックス型セルで左矢印キーによるセルの移動ができなくなる場合がある
対象製品
El Tabelle for .NET 2.0J
発生環境
・この現象は次のファイル バージョンのアセンブリで発生します。
v2.0.2004.0304
v2.0.2004.0324 (HotFix)
v2.0.2004.0521
v2.0.2004.0629 (HotFix)
v2.0.2004.0304
v2.0.2004.0324 (HotFix)
v2.0.2004.0521
v2.0.2004.0629 (HotFix)
状況
修正済み
詳細
コンボボックス型セルで、次のような設定内容と手順を行うと、左矢印キーによるセルの移動ができなくなります。
・設定内容
[Visual Basic]
Sheet1.EditType = GrapeCity.Win.ElTabelle.EditType.AlwaysEdit
Sheet1.ExitOnArrows = True
Dim objComboBoxEditor As New GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor
objComboBoxEditor.Editable = False
Sheet1(1, 0).Editor = objComboBoxEditor
[C#]
sheet1.EditType = GrapeCity.Win.ElTabelle.EditType.AlwaysEdit;
sheet1.ExitOnArrows = true;
GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor objComboBoxEditor =
new GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor();
objComboBoxEditor.Editable = false;
sheet1[1, 0].Editor = objComboBoxEditor;
・手順
コンボボックス型セルでドロップダウンリストから適当な項目を選択した後、左矢印キーを押下します。
・設定内容
[Visual Basic]
Sheet1.EditType = GrapeCity.Win.ElTabelle.EditType.AlwaysEdit
Sheet1.ExitOnArrows = True
Dim objComboBoxEditor As New GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor
objComboBoxEditor.Editable = False
Sheet1(1, 0).Editor = objComboBoxEditor
[C#]
sheet1.EditType = GrapeCity.Win.ElTabelle.EditType.AlwaysEdit;
sheet1.ExitOnArrows = true;
GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor objComboBoxEditor =
new GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor();
objComboBoxEditor.Editable = false;
sheet1[1, 0].Editor = objComboBoxEditor;
・手順
コンボボックス型セルでドロップダウンリストから適当な項目を選択した後、左矢印キーを押下します。
回避方法
この現象はファイル バージョン v2.0.2004.0831 以降のアセンブリで修正されています。
修正版は こちら からダウンロードできます。
また、次の操作を行うことで現象を回避できます。
・拡張コンボボックス型セルで代用する
・コーディングで回避する
[Visual Basic]
Private Sub Sheet1_KeyDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Sheet1.KeyDown
If TypeOf Sheet1.ActiveCell.Editor Is _
GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor Then
If e.KeyCode = Keys.Left Then
Sheet1.ActivePosition = New GrapeCity.Win.ElTabelle.Position _
(Sheet1.ActivePosition.Column - 1, Sheet1.ActivePosition.Row)
End If
End If
End Sub
[C#]
private void sheet1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if((sheet1.ActiveCell.Editor as GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor) != null)
{
if(e.KeyCode == Keys.Left)
{
sheet1.ActivePosition = new GrapeCity.Win.ElTabelle.Position(sheet1.ActivePosition.Column - 1,sheet1.ActivePosition.Row);
}
}
}
修正版は こちら からダウンロードできます。
また、次の操作を行うことで現象を回避できます。
・拡張コンボボックス型セルで代用する
・コーディングで回避する
[Visual Basic]
Private Sub Sheet1_KeyDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Sheet1.KeyDown
If TypeOf Sheet1.ActiveCell.Editor Is _
GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor Then
If e.KeyCode = Keys.Left Then
Sheet1.ActivePosition = New GrapeCity.Win.ElTabelle.Position _
(Sheet1.ActivePosition.Column - 1, Sheet1.ActivePosition.Row)
End If
End If
End Sub
[C#]
private void sheet1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if((sheet1.ActiveCell.Editor as GrapeCity.Win.ElTabelle.Editors.ComboBoxEditor) != null)
{
if(e.KeyCode == Keys.Left)
{
sheet1.ActivePosition = new GrapeCity.Win.ElTabelle.Position(sheet1.ActivePosition.Column - 1,sheet1.ActivePosition.Row);
}
}
}
キーワード
ELTB04043
この文書は、以前は次のバグレポートIDで公開されていました : 4308