Get Current Line for CaseCorrectText

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by Todd Richardson
I decided to do case correction when the space bar is pressed rather then waiting til the enter key is hit. This seems to work, but is this the easiest way to retrieve the current line?

If e.KeyCode = Keys.Space Then
            Dim CurrentView As ActiproSoftware.SyntaxEditor.EditorView = CurrentEditor.SelectedView
            Dim CurrentLine As Integer = CurrentView.CurrentDocumentLine.Index
            CurrentEditor.Document.CaseCorrectText(CurrentLine, CurrentLine)
        End If

[Modified at 07/08/2005 02:59 PM]

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Yes, that's the way to do it. Either that or do an IndexOf on the document lines collection with the caret's offset. Same sort of thing.

Actipro Software Support

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.