[GH-ISSUE #592] how to make this buttom menu in multilines when i resize the window? #434

Closed
opened 2026-03-04 01:04:56 +03:00 by kerem · 2 comments
Owner

Originally created by @r9w-design on GitHub (Apr 26, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/592

屏幕截图 2021-04-26 235501
how to make this buttom menu in multilines when i resize the window? cheers

Originally created by @r9w-design on GitHub (Apr 26, 2021). Original GitHub issue: https://github.com/rivo/tview/issues/592 ![屏幕截图 2021-04-26 235501](https://user-images.githubusercontent.com/30255258/116113208-e0435800-a6ea-11eb-8dbd-d16d3dd0748c.png) how to make this buttom menu in multilines when i resize the window? cheers
kerem closed this issue 2026-03-04 01:04:56 +03:00
Author
Owner

@rivo commented on GitHub (Apr 27, 2021):

I didn't bother doing this in the demo because there is no automatic way to do it. I guess it could be done but it would probably complicate the demo code quite a bit. For these examples, I try to keep it simple.

If you have something similar in your application, maybe you could simply place it on two lines by default. Or, if you insist, you'll probably have to listen to draw events (with Application.SetBeforeDrawFunc()) and then adjust your Flex or Grid according to the current screen size.

<!-- gh-comment-id:827604069 --> @rivo commented on GitHub (Apr 27, 2021): I didn't bother doing this in the demo because there is no automatic way to do it. I guess it could be done but it would probably complicate the demo code quite a bit. For these examples, I try to keep it simple. If you have something similar in your application, maybe you could simply place it on two lines by default. Or, if you insist, you'll probably have to listen to draw events (with [`Application.SetBeforeDrawFunc()`](https://pkg.go.dev/github.com/rivo/tview#Application.SetBeforeDrawFunc)) and then adjust your `Flex` or `Grid` according to the current screen size.
Author
Owner

@r9w-design commented on GitHub (Apr 29, 2021):

thank you

<!-- gh-comment-id:829015265 --> @r9w-design commented on GitHub (Apr 29, 2021): thank you
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#434
No description provided.