I just started learning JUCE, and for the most part I am getting to grips with it pretty quickly as I find the framework to be quite intuitive.
Until now I have been setting the size and position of child components in the parent’s resized function as shown in the tutorials.
However, what if I want to use the natural size of a child? For example, say I have a listbox and I want to position it such that it can show all its items and no more.
I have searched around in the API, but so far have been unable to find a way to do the following:
- How to get the natural size of an existing component such as a TextEditor.
- How to calculate and return the natural size of my own components.
All hints are appreciated.
With kind regards,