mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #397] #Question, how to add add screen elements dynamically #291
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#291
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 @shaunenslin on GitHub (Feb 7, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/397
Hi
I am battling to get this right. I have a flex grid on the screen and am asking them to make a choice. So, in essence
I create a flex and in it, put a dropdown.
Based on the dropdown answer, I want to ask a different question, but want to simply add the next question to the flex.
eg. Kind of like below, so when a selection is made on the ssdropdown, I want to add the ltdropdown to the flexgrid. I have used app.Draw() to try refresh the screen, but the ltdropdown never appears on the screen
@agruenberg commented on GitHub (Feb 10, 2020):
Try this:
It's not a pretty GUI design, but it works.
@rivo commented on GitHub (Feb 19, 2020):
@agruenberg is right. Your
Flexis empty because you never addssdropdownto it.Also,
app.Draw()is not required, see here for details.Even in @agruenberg's answer, a new
DropDownwill be added every time a selection is made inssdropdown. Depending on what you want to do, this may still need more work.Please let me know if this answers your question.
@shaunenslin commented on GitHub (Feb 19, 2020):
Worked like a charm, thanks so much
@shaunenslin commented on GitHub (Feb 19, 2020):
Worked like a charm, thanks so much