[GH-ISSUE #512] Horizonal scroll for List #371

Closed
opened 2026-03-04 01:04:25 +03:00 by kerem · 2 comments
Owner

Originally created by @abitrolly on GitHub (Oct 9, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/512

I want to add horizonal scrolling to the list element, because for wide tables not everything could fit the screen.

image

There is no setting for this on the List element https://pkg.go.dev/github.com/rivo/tview#List

What is the proper way to do this? An example in wiki would be nice to have.

Originally created by @abitrolly on GitHub (Oct 9, 2020). Original GitHub issue: https://github.com/rivo/tview/issues/512 I want to add horizonal scrolling to the list element, because for wide tables not everything could fit the screen. ![image](https://user-images.githubusercontent.com/8781107/95545693-48f50c80-0a07-11eb-95e9-6b75ee35af60.png) There is no setting for this on the List element https://pkg.go.dev/github.com/rivo/tview#List What is the proper way to do this? An example in wiki would be nice to have.
kerem closed this issue 2026-03-04 01:04:25 +03:00
Author
Owner

@tslocum commented on GitHub (Oct 13, 2020):

Hey @abitrolly, I've submitted the necessary changes to implement this for review.

Horizontal scrolling is also available in cview, a fork of tview.

<!-- gh-comment-id:707883777 --> @tslocum commented on GitHub (Oct 13, 2020): Hey @abitrolly, I've submitted the necessary changes to implement this for review. Horizontal scrolling is also available in [cview](https://gitlab.com/tslocum/cview), a fork of tview.
Author
Owner

@rivo commented on GitHub (Feb 15, 2021):

@abitrolly It was previously not possible to shift list items horizontally. This is now implemented with the latest version. There are now SetOffset() and GetOffset() functions but I'm not sure if you need them because I also extended the function of the left and right arrow keys. Before hitting the right arrow key selects the next item (as it was before), it will shift the list to the left if it doesn't fit its box.

If this doesn't work as expected, please open a new issue so I don't miss it.

<!-- gh-comment-id:779367563 --> @rivo commented on GitHub (Feb 15, 2021): @abitrolly It was previously not possible to shift list items horizontally. This is now implemented with the latest version. There are now `SetOffset()` and `GetOffset()` functions but I'm not sure if you need them because I also extended the function of the left and right arrow keys. Before hitting the right arrow key selects the next item (as it was before), it will shift the list to the left if it doesn't fit its box. If this doesn't work as expected, please open a new issue so I don't miss it.
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#371
No description provided.