| 基本操作 > 編集機能 > 矢印キーで編集を終了させない |
矢印キーで編集が終了されないようにするには、StartEditing() を呼び出すだけで済みます。次の例をご参照ください。
|
コードのコピー
|
|
|---|---|
InitializeComponent()
Using _flex.Rows.DeferNotifications()
Dim rowCount As Integer = 10
Dim colCount As Integer = 7
For i As Integer = 0 To rowCount - 1
_flex.Rows.Add(New C1.WPF.FlexGrid.Row())
Next
For i As Integer = 0 To colCount - 1
_flex.Columns.Add(New C1.WPF.FlexGrid.Column())
Next
For r As Integer = 0 To rowCount - 1
For c As Integer = 0 To colCount - 1
_flex(r, c) = String.Format("[{0},{1}]", r.ToString(), c.ToString())
Next
Next
' 矢印キーによる編集の終了を無効にします
_flex.StartEditing(True)
End Using
End Sub
|
|
|
コードのコピー
|
|
|---|---|
InitializeComponent(); using (_flex.Rows.DeferNotifications()) { int rowCount = 10; int colCount = 7; for (int i = 0; i < rowCount; i++) { _flex.Rows.Add(new C1.WPF.FlexGrid.Row()); } for (int i = 0; i < colCount; i++) { _flex.Columns.Add(new C1.WPF.FlexGrid.Column()); } for (int r = 0; r < rowCount; r++) { for (int c = 0; c < colCount; c++) { _flex[r, c] = string.Format("[{0},{1}]", r.ToString(), c.ToString()); } } // 矢印キーによる編集の終了を無効にします _flex.StartEditing(true); } |
|