Skip to content

Get Screen Dimensions #1047

Answered by ArthurSonzogni
cuppajoeman asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @cuppajoeman

The dimensions reported are the one from the last drawing. If you haven't drawn something 0x0 will be reported.

The dimension depends on the terminal screen dimensions, the component dimension and the ftxui::Screen config. That's why it requires drawing the component first to report the size.

To access the terminal dimension directly, you can use ftxui::Terminal::Size() instead.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by cuppajoeman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants