Get Current Line for CaseCorrectText

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Todd Richardson
Avatar
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
Thanks!

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

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.