mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #98] switch focus in multiple embeded flex does not work #77
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#77
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 @stephencheng on GitHub (Apr 9, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/98
I am trying to put up a layout like this:
I have my demo code here: https://gitlab.com/cmdemo/demobin/tree/master/tview/tabs
I have pretty much copied the presentation demo code but change a little bit with flex layout.
A few things:
I will have to use between setfoucs and run to make it work, even though I have the code: AddItem(table, 0, 1, true). Your presentation code does not explicitly declare SetFoucs other than the Navigate function. It works but I just couldn't figure this out why.
When I select Navigate in list, it has a highlight on table, but the arrow key up/down does not switch the focus onto table but remains in list. I have tried many ways to try to resolve it, including removing the : app.SetInputCapture but no luck.
The only thing I could think it might be that there are quite a few layers of flex and it's getting confused how to switch the foucs, or is this could be a bug?
Thanks
@stephencheng commented on GitHub (Apr 10, 2018):
Sorry, it's my bad. I spent a the whole day on this and just spotted the problem.
The app declaration being duplicated and it just didn't work in that way.