clitic / kdam

A console progress bar library for Rust. (inspired by tqdm & rich.progress)
https://docs.rs/kdam
Apache License 2.0
196 stars 6 forks source link

Can I keep the order of multiple progress bars? #12

Closed maboroshinokiseki closed 1 year ago

maboroshinokiseki commented 1 year ago

I want to have multiple progress bars and keep there at where they were, I checked the example, progress bars finished will be moved to the top, next to the last finished progress bar.

Is there any way to prevent this from happening?

clitic commented 1 year ago

Have you tried this example. If RowManager doesn't satisfy your needs then you need to create a custom row manager implementation (src).

https://user-images.githubusercontent.com/71246790/182090907-b4aa426d-7ebc-43b8-88c9-7d13b2bd214f.mp4

If you wish not to use RowManager then there is position field which can be set. After creating progress bar also call .refresh() method once. If you use position field then progress bar will be kept at that place only.

maboroshinokiseki commented 1 year ago

Thanks, I'll try to implement a custom RowManager.