mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #309] Hide/show a widget in a flex layout on demand #234
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#234
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 @lenormf on GitHub (Jun 17, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/309
Hi,
I want to hide/show a
TextViewwidget in aFlexlayout on demand, the goal would be to show contextual information depending on the state of the application (e.g. tips, completion candidates).A proposal based on adding
nilobjects to the layout has been hinted at in #104, what is the status of that feature?Thanks!
@rivo commented on GitHub (Jun 18, 2019):
nilobjects can be added toFlex, seeAddItem():But I'm not sure that this will help you achieve what you want to do. Do you want the
TextViewto be temporarily empty or do you want to take it out of the layout completely? There is aRemoveItem()function.@lenormf commented on GitHub (Jun 18, 2019):
I want the
TextViewnot to take any screen space unless I'm printing information in it, possibly without having to re-instantiate it every time I need it.@rivo commented on GitHub (Jul 10, 2019):
You don't need to re-instantiate it. When you call
RemoveItem(), it's just taken out of theFlexlayout. You can callAddItem()with the sameTextViewobject again.@lenormf commented on GitHub (Jul 10, 2019):
Thanks, I'll play around with that then. Closing, in the meantime.