mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #202] After init how to set focus in Flex #159
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#159
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 @delaneyj on GitHub (Dec 5, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/202
There appears to be no way to set the focused item in a
Flexafter initialization. I tried adding stuff like@rivo commented on GitHub (Dec 14, 2018):
I'm not quite sure I understand. (Your code appears to extend this package which confuses me.)
The
Flex.AddItem()function includes a parameterfocuswhich can be set totrueto give it focus. If you don't know at that time which element should have focus, you can always useApplication.SetFocus()later and provide your flex item.Let me know if this clarifies it for you. If not, it would help to see some example code that illustrates your issue.
@rivo commented on GitHub (Dec 25, 2018):
I'll reopen if it turns out this is not yet resolved.