非編集状態からのIMEモードを設定したテキスト型セルへの上書き入力が不正になる
対象製品
SPREAD for WPF 1.0J
状況
修正済み
詳細
非編集状態からのIMEモードを設定したテキスト型セルへの上書き入力が不正になります。
【手順】
1.新規ウィンドウにSPREADを配置します
2.下記サンプルコードをコピーし、アプリケーションを実行します
3.B1セルをクリックします
--IMEがひらがなになります
4.[ka]キーを押下します
--「kあ」が入力されます
※本来は、「か」が入力されます
【サンプルコード】
Private Sub MainWindow_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
' テキスト型セルのIMEモードをひらがなにします
Dim textCellType1 As New GrapeCity.Windows.SpreadGrid.TextCellType()
textCellType1.IsInputMethodEnabled = True
textCellType1.ImeConversionMode = System.Windows.Input.ImeConversionModeValues.Native Or System.Windows.Input.ImeConversionModeValues.FullShape
textCellType1.ImeState = System.Windows.Input.InputMethodState.On
GcSpreadGrid1.Columns(1).CellType = textCellType1
GcSpreadGrid1.Cells(0, 1).Value = "あいう"
End Sub
【手順】
1.新規ウィンドウにSPREADを配置します
2.下記サンプルコードをコピーし、アプリケーションを実行します
3.B1セルをクリックします
--IMEがひらがなになります
4.[ka]キーを押下します
--「kあ」が入力されます
※本来は、「か」が入力されます
【サンプルコード】
Private Sub MainWindow_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
' テキスト型セルのIMEモードをひらがなにします
Dim textCellType1 As New GrapeCity.Windows.SpreadGrid.TextCellType()
textCellType1.IsInputMethodEnabled = True
textCellType1.ImeConversionMode = System.Windows.Input.ImeConversionModeValues.Native Or System.Windows.Input.ImeConversionModeValues.FullShape
textCellType1.ImeState = System.Windows.Input.InputMethodState.On
GcSpreadGrid1.Columns(1).CellType = textCellType1
GcSpreadGrid1.Cells(0, 1).Value = "あいう"
End Sub
回避方法
Service Pack 2(v1.0.2015.1109)で修正済み。
Service Pack 2(v1.0.2015.1109)より前のバージョンでは次の回避方法が有効です。
------------------------------------------
セルの編集開始時に値をクリアします。
【サンプルコード】
Private Sub GcSpreadGrid1_CellBeginEdit(sender As Object, e As GrapeCity.Windows.SpreadGrid.SpreadCellBeginEditEventArgs) Handles GcSpreadGrid1.CellBeginEdit
If e.BeginEditAction = GrapeCity.Windows.SpreadGrid.SpreadBeginEditAction.ImeInput AndAlso TypeOf GcSpreadGrid1(e.CellPosition).InheritedCellType Is GrapeCity.Windows.SpreadGrid.TextCellType Then
GcSpreadGrid1(e.CellPosition).Value = Nothing
End If
End Sub
Service Pack 2(v1.0.2015.1109)より前のバージョンでは次の回避方法が有効です。
------------------------------------------
セルの編集開始時に値をクリアします。
【サンプルコード】
Private Sub GcSpreadGrid1_CellBeginEdit(sender As Object, e As GrapeCity.Windows.SpreadGrid.SpreadCellBeginEditEventArgs) Handles GcSpreadGrid1.CellBeginEdit
If e.BeginEditAction = GrapeCity.Windows.SpreadGrid.SpreadBeginEditAction.ImeInput AndAlso TypeOf GcSpreadGrid1(e.CellPosition).InheritedCellType Is GrapeCity.Windows.SpreadGrid.TextCellType Then
GcSpreadGrid1(e.CellPosition).Value = Nothing
End If
End Sub