Skip to content

How to get the current line text in TextArea (without knowing the line number)? #4936

Answered by darrenburns
learnbyexample asked this question in Q&A
Discussion options

You must be logged in to vote

Use cursor_line_index, cursor_column_index = self.cursor_location to get the cursor location indices.

You can use self.document.get_line(line_index) to get the line content as a string.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@learnbyexample
Comment options

@darrenburns
Comment options

@learnbyexample
Comment options

Answer selected by learnbyexample
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants