mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #83] Feature Request: Progress Bar #63
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SommerEngineering on GitHub (Mar 16, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/83
Dear rivo,
thanks for this great library. I'm working on a music playing app (VLC as backend) with tview: https://github.com/SommerEngineering/MusicPlayer Right now, it works only with macOS.
It would be great to have a simple progress bar: I could use it to show the current position of a song. Just need a
SetProgress(percent int)function to set the position at the interval [0,100].Is this doable?
Best regards
Thorsten
@rivo commented on GitHub (Mar 18, 2018):
Hi Thorsten, glad that you like
tview. At the moment, there is no progress bar. This is somewhat related to #11 where people asked for charts. I'm planning to add chart functionality totviewat some point the future but probably not soon enough for you if you need it now.Until then, I suggest that you build your own progress bar. You may be able to use the
TextViewelement for it, by writingU+25A0characters to it. Or, if you need to get more advanced, you can useSetDrawFunc()to write characters to aBox. I believe this should be help you implement a progress bar.I'm currently working on a Wiki page with examples how to implement your own widget: https://github.com/rivo/tview/wiki/Primitives It's not complete yet, though. I'll try to finish it in the next few days.
@muesli commented on GitHub (Mar 18, 2018):
Shouldn't we keep the issue open since it's still a valid ticket worth tracking?
@rivo commented on GitHub (Mar 18, 2018):
If there's ever going to be a progress bar (which I'm really not sure at this point), it is going to be part of the charts. And the charts are really far out, v2.0 or something. I don't believe @SommerEngineering will wait that long, especially when he has other options to achieve his goal right now.
@majimboo commented on GitHub (Apr 18, 2019):
Still waiting for this or a sample code for the implementation with a box would be acceptable too.
@rivo commented on GitHub (Apr 18, 2019):
Apologies. I'm traveling at the moment with very little internet access. Will get back to the open issues when I get back.
Sent from my iPhone
@lancerushing commented on GitHub (Jan 16, 2020):
Using rivo's suggestion to use U+25A0 characters, I made this example:
@raziman18 commented on GitHub (Jun 21, 2020):
A slightly more simple example
@tslocum commented on GitHub (Oct 15, 2020):
A ProgressBar widget is available in cview, a fork of tview. A PR to include the widget in tview was submitted as #388.
Demo:
ssh cview.rocketnine.space -p 20000