[GH-ISSUE #233] Feature request: add GetText method to TextView #178

Closed
opened 2026-03-04 01:02:41 +03:00 by kerem · 1 comment
Owner

Originally created by @dguendisch on GitHub (Feb 3, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/233

Would be helpful to have a GetText method on a TextView to get the current text.
Would free myself from tracking this "state" as it is already present in the TextView itself.

(Background: I'm mostly using filterable textviews, that is a TextView surrounded by means to filter and highlight the respective text. Currently I need to wrap all "text-changing" calls to the TextView so that I can track the currently displayed text, so that I can later filter/search on it. If TextView had a GetText I wouldn't need to care who is setting or appending new text to the TextView, but simply get the current text with GetText whenever I need it)

Originally created by @dguendisch on GitHub (Feb 3, 2019). Original GitHub issue: https://github.com/rivo/tview/issues/233 Would be helpful to have a `GetText` method on a TextView to get the current text. Would free myself from tracking this "state" as it is already present in the TextView itself. (Background: I'm mostly using filterable textviews, that is a TextView surrounded by means to filter and highlight the respective text. Currently I need to wrap all "text-changing" calls to the TextView so that I can track the currently displayed text, so that I can later filter/search on it. If TextView had a `GetText` I wouldn't need to care who is setting or appending new text to the TextView, but simply get the current text with `GetText` whenever I need it)
kerem closed this issue 2026-03-04 01:02:41 +03:00
Author
Owner

@rivo commented on GitHub (Feb 13, 2019):

That makes sense. I added this function to the class with the latest commit.

<!-- gh-comment-id:463245931 --> @rivo commented on GitHub (Feb 13, 2019): That makes sense. I added this function to the class with the latest commit.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#178
No description provided.