Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

can a list be rendered bottom first? #16

Closed
cardoe opened this issue Sep 23, 2017 · 4 comments
Closed

can a list be rendered bottom first? #16

cardoe opened this issue Sep 23, 2017 · 4 comments
Assignees

Comments

@cardoe
Copy link

cardoe commented Sep 23, 2017

I see the style modifier Invert but when I have a list area that can have say 10 items in it but I only have 4 items they still appear at the top and not at the bottom of the area? I'm trying to make two lists that give the data points on say a bell curve and the lists converge on the center point. If that doesn't make sense let me know and I'll try to draw something.

@fdehau
Copy link
Owner

fdehau commented Sep 27, 2017

The Style modifier only affects the look and feel of a widget not its structure nor its layout. The available modifiers are specific to the chosen backend (termion or rustbox) and to your terminal emulator as they refer to their equivalent ANSI escape sequences. Concerning your use case, it is not possible to render a list in such way now without inserting empty strings manually. Therefore, I've added an option to change the corner where the list start to be rendered. Using:

.start_corner(Corner::BottomLeft)

should let you render the list bottom first.
Let me know if #17 fix your problem :)

@fdehau fdehau self-assigned this Sep 27, 2017
@fdehau fdehau added this to the 0.2.0 milestone Sep 27, 2017
@sashaweiss
Copy link

Hi,

I've run into the same problem, and was wondering if #17 might get merged in soon? It looks like exactly what I'm looking for!

Best,
Sasha

@fdehau fdehau removed this from the 0.2.0 milestone Jun 9, 2018
@fdehau
Copy link
Owner

fdehau commented Jun 9, 2018

Hi, I've just released 0.2.3 with the option you requested =)

@fdehau fdehau closed this as completed Jun 9, 2018
@sashaweiss
Copy link

Awesome - thank you so much!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants