How to get Element dimensions? #395
-
I'm building a simple interface with 4 sections of text (top, bottom, left, right) and a canvas in the middle of them all. All of the sections are resizable. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is a 'canvas' function taking a callback. Instead of providing your own canvas of fixed size, one filling the full area is provided to you: Alternatively, you can wrap your element with 'reflect'. It will write the size/position of the box where it has been rendered to: |
Beta Was this translation helpful? Give feedback.
There is a 'canvas' function taking a callback. Instead of providing your own canvas of fixed size, one filling the full area is provided to you:
https://arthursonzogni.github.io/FTXUI/namespaceftxui.html#a8bef154e558868d259c52380e1e5ead9
Alternatively, you can wrap your element with 'reflect'. It will write the size/position of the box where it has been rendered to:
https://arthursonzogni.github.io/FTXUI/namespaceftxui.html#aaff8245861617a3d9e846e99de582a63