Defines the direction when using the SftTree.EditNavigate method.
Class: (none)
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public enum EditNavigateEnum;
Public Enum EditNavigateEnum
| Name | Description |
|---|---|
| Up | The next cell above the current cell. |
| Down | The next cell below the current cell. |
| Left | The cell to the left of the current cell. |
| Right | The cell to the right of the current cell. |
| Home | The first editable cell in the control. |
| End | The last editable cell in the control. |
Defines the direction when using the SftTree.EditNavigate method.
if (e.Area == Softelvdm.SftTreeNET.ItemClickAreaEnum.CellSel)
e.Cell.Edit(); // Start cell editing
}
// Handle all the cell navigation for the text box here
private void textBox1_KeyDown(object sender, KeyEventArgs e) {
if (e.KeyCode == Keys.Up) {
sftTree1.EditNavigate(EditNavigateEnum.Up);
e.Handled = true;
} else if (e.KeyCode == Keys.Down) {
sftTree1.EditNavigate(EditNavigateEnum.Down);
e.Handled = true;
} else if (e.KeyCode == Keys.Left && (e.Modifiers & Keys.Control) != 0) { // Ctrl+Left
sftTree1.EditNavigate(EditNavigateEnum.Left);
e.Handled = true;
DumpValues(e)
If e.Area = ItemClickAreaEnum.CellSel Then
e.Cell.Edit() ' Start cell editing
End If
End Sub
Private Sub textBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyDown
If e.KeyCode = Keys.Up Then
sftTree1.EditNavigate(EditNavigateEnum.Up)
e.Handled = True
ElseIf e.KeyCode = Keys.Down Then
sftTree1.EditNavigate(EditNavigateEnum.Down)
e.Handled = True
ElseIf e.KeyCode = Keys.Left And (e.Modifiers And Keys.Control) <> 0 Then ' Ctrl+Left
sftTree1.EditNavigate(EditNavigateEnum.Left)
e.Handled = TrueSee Also | Classes | SftTree/NET 2.0