[GH-ISSUE #668] Is it possible to remove line numbers in lists? #490

Closed
opened 2026-03-04 01:05:27 +03:00 by kerem · 5 comments
Owner

Originally created by @JCzz on GitHub (Nov 6, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/668

Thanks for a very nice ui tool!

Is it possible to remove line numbers in lists?

	myListView := tview.NewList()
	myListView.SetTitle("Resources")
        // myListView.ShowLineNumners(false)
Originally created by @JCzz on GitHub (Nov 6, 2021). Original GitHub issue: https://github.com/rivo/tview/issues/668 Thanks for a very nice ui tool! Is it possible to remove line numbers in lists? ``` myListView := tview.NewList() myListView.SetTitle("Resources") // myListView.ShowLineNumners(false) ```
kerem closed this issue 2026-03-04 01:05:28 +03:00
Author
Owner

@rivo commented on GitHub (Nov 8, 2021):

I don't understand this. List doesn't include any line numbers.

<!-- gh-comment-id:963231737 --> @rivo commented on GitHub (Nov 8, 2021): I don't understand this. `List` doesn't include any line numbers.
Author
Owner

@JCzz commented on GitHub (Nov 8, 2021):

Sorry, I found that I was setting shortcut in list.AddItem to a number - Is it possibel to leave out shortcuts, so it does not show "( )"?

Thanks again for a great tool!

<!-- gh-comment-id:963503276 --> @JCzz commented on GitHub (Nov 8, 2021): Sorry, I found that I was setting shortcut in list.AddItem to a number - Is it possibel to leave out shortcuts, so it does not show "( )"? Thanks again for a great tool!
Author
Owner

@JCzz commented on GitHub (Nov 8, 2021):

Is it possibel to leave out shortcuts, so it does not show "( )"?

Thanks again for a great tool!

<!-- gh-comment-id:963512117 --> @JCzz commented on GitHub (Nov 8, 2021): Is it possibel to leave out shortcuts, so it does not show "( )"? Thanks again for a great tool!
Author
Owner

@rivo commented on GitHub (Nov 9, 2021):

It's in the documentation:

The shortcut is a key binding. If the specified rune is entered, the item is selected immediately. Set to 0 for no binding.

If you set all of them to 0, none of them will show up. If you see ( ), I suspect you've specified an empty space instead of 0.

<!-- gh-comment-id:963860508 --> @rivo commented on GitHub (Nov 9, 2021): It's in the [documentation](https://pkg.go.dev/github.com/rivo/tview#List.InsertItem): > The shortcut is a key binding. If the specified rune is entered, the item is selected immediately. **Set to 0 for no binding.** If you set all of them to `0`, none of them will show up. If you see `( )`, I suspect you've specified an empty space instead of `0`.
Author
Owner

@JCzz commented on GitHub (Nov 12, 2021):

Right, thanks - very nice

<!-- gh-comment-id:967256645 --> @JCzz commented on GitHub (Nov 12, 2021): Right, thanks - very nice
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#490
No description provided.