-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to always "scroll to bottom"/"crop from top where necessary"? #45
Comments
If you specifically want to work with lines that are strings, a custom widget such as the following can do what you want. If you want this behavior to work for arbitrary widgets, a viewport will be necessary and in that case rather than using visibility functions you'll need to call
|
Oh great, that works perfectly. I could have looked into custom widgets myself, but had assumed there would be a solution using the existing combinators. Thanks for the quick reply! |
Great! I definitely want the built-in combinators to make writing custom widgets unnecessary, but there will definitely be cases where that's the only approach. |
I would like behaviour where lines grow from bottom to top, for a greedy widget. lets say there is space for 10 lines. If there is one line of content, i want it to be at the bottom. if there are 20 lines of contents, i want 11-20 displayed.
I have played around with viewports/adding empty lines/translating; nothing gave this exact behaviour. closest was invoking
visible
on the bottom line; but then the viewport remains translated even if the available space increases (again). (Also, this solution feels kinda hacky.)The text was updated successfully, but these errors were encountered: