[GH-ISSUE #950] Scroll bars for tables and textviews #697

Open
opened 2026-03-04 01:07:06 +03:00 by kerem · 3 comments
Owner

Originally created by @darkhz on GitHub (Feb 22, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/950

It would be good if scroll bars were shown for tables and textviews, so that the user can be notified about the position of the content and if there is any remaining content to be scrolled to.

Originally created by @darkhz on GitHub (Feb 22, 2024). Original GitHub issue: https://github.com/rivo/tview/issues/950 It would be good if scroll bars were shown for tables and textviews, so that the user can be notified about the position of the content and if there is any remaining content to be scrolled to.
Author
Owner

@rivo commented on GitHub (Mar 7, 2024):

I don't think this will be added any time soon. Most widgets, especially text views and text areas, don't know their entire content, much less a laid out version of it. They gradually parse and layout text as the user navigates to it. Tables can also be "infinitely" large, see https://github.com/rivo/tview/blob/master/demos/table/virtualtable/main.go for an example. If we wanted to show scrollbars for a text view, for example, we'd have to parse its entire text first, including any style/region tags and word wrapping. This would be a huge performance hit on large texts. (Actually, it was like this in beginning and lots of people complained about bad performance.)

I have plans to add functionality that might make it easier for you to add something like this yourself, however. Can't say right now, though, when this will be available.

<!-- gh-comment-id:1984336918 --> @rivo commented on GitHub (Mar 7, 2024): I don't think this will be added any time soon. Most widgets, especially text views and text areas, don't know their entire content, much less a laid out version of it. They gradually parse and layout text as the user navigates to it. Tables can also be "infinitely" large, see https://github.com/rivo/tview/blob/master/demos/table/virtualtable/main.go for an example. If we wanted to show scrollbars for a text view, for example, we'd have to parse its entire text first, including any style/region tags and word wrapping. This would be a huge performance hit on large texts. (Actually, it was like this in beginning and lots of people complained about bad performance.) I have plans to add functionality that might make it easier for you to add something like this yourself, however. Can't say right now, though, when this will be available.
Author
Owner

@pancsta commented on GitHub (Mar 26, 2025):

I will chime in that cview has a working scrollbar implementation with styling.

<!-- gh-comment-id:2755319804 --> @pancsta commented on GitHub (Mar 26, 2025): I will chime in that [cview has a working scrollbar implementation](https://code.rocket9labs.com/tslocum/cview) with styling. ![](https://code.rocketnine.space/tslocum/cview/raw/branch/master/cview.svg)
Author
Owner

@cherio commented on GitHub (May 5, 2025):

There is an alternative approach implemented on many websites. Scrollable areas display scroll bars based on the content already loaded. Scrollbar position adjusts every time more content is loaded. That's the way they solve the problem of "infinite" lists.

<!-- gh-comment-id:2851971071 --> @cherio commented on GitHub (May 5, 2025): There is an alternative approach implemented on many websites. Scrollable areas display scroll bars based on the content already loaded. Scrollbar position adjusts every time more content is loaded. That's the way they solve the problem of "infinite" lists.
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#697
No description provided.