method Edit.IndentSel (Forward as Boolean)
Indents the selected text.

TypeDescription
Forward as Boolean A boolean expression that indicates whether the selection is indented forward or backward.
Use the IndentSel method to indent the selected text by code. The action is similar to pressing the TAB or SHIFT + TAB key while the control has the focus, and you have selected multiple lines. Use the IndentOnTab property to disable indentation of the selection when user presses the TAB key.

The following VB sample indents the selection to the right when the user press the F1 key:

Private Sub Edit1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = KeyCodeConstants.vbKeyF1 Then
        Edit1.IndentSel True
    End If
End Sub

The following C++ sample indents the selection to the right when the user press the F1 key:

void OnKeyDownEdit1(short FAR* KeyCode, short Shift) 
{
	if ( *KeyCode == VK_F11 )
		m_edit.IndentSel( TRUE );
}

The following VB.NET sample indents the selection to the right when the user press the F1 key:

Private Sub AxEdit1_KeyDownEvent(ByVal sender As Object, ByVal e As AxEXEDITLib._IEditEvents_KeyDownEvent) Handles AxEdit1.KeyDownEvent
    If (Convert.ToInt32(e.keyCode) = Convert.ToInt32(Keys.F11)) Then
        AxEdit1.IndentSel(True)
    End If
End Sub

The following C# sample indents the selection to the right when the user press the F1 key:

private void axEdit1_KeyDownEvent(object sender, AxEXEDITLib._IEditEvents_KeyDownEvent e)
{
	if (Convert.ToInt32(e.keyCode) == Convert.ToInt32(Keys.F11))
		axEdit1.IndentSel(true);
}

The following VFP sample indents the selection to the right when the user press the F1 key:

*** ActiveX Control Event ***
LPARAMETERS keycode, shift

if ( keycode = 122 )
	thisform.Edit1.IndentSel(.t.)
endif