HeaderPane
Main
Hide
Share Link
Print

EditNavigateEnum Enumeration

Defines the direction when using the SftTree.EditNavigate method.

Class: (none)
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public enum EditNavigateEnum;
Public Enum EditNavigateEnum

Values

NameDescription
UpThe next cell above the current cell.
DownThe next cell below the current cell.
LeftThe cell to the left of the current cell.
RightThe cell to the right of the current cell.
HomeThe first editable cell in the control.
EndThe last editable cell in the control.

Comments

Defines the direction when using the SftTree.EditNavigate method.

Examples

C#

        private void sftTree1_TopItemChanged(object sender, EventArgs e) {
            DumpValues("TopItemChanged", e);
        }

        // 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;
            } else if (e.KeyCode == Keys.Right && (e.Modifiers & Keys.Control) != 0) { // Ctrl+Right

VB.NET

Private Sub SftTree1_SplitterOffsetChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SftTree1.SplitterOffsetChanged
    DumpValues("SplitterOffsetChanged", e)
End Sub

Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
' Handle all the cell navigation for the text box here 
    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 = True
    ElseIf e.KeyCode = Keys.Right And (e.Modifiers And Keys.Control) <> 0 Then ' Ctrl+Right

See Also | Classes | SftTree/NET 3.0