Getting the size of the text holder

How one can get the size of a text-editor field holder?

I need that for my XML editor, where I would like to automatically size-up the text-editor components to be a size which can fit all the text.

I’ve changed my juce_TextEditor.h to have a new member function called:

getTextHolderHeight(), and in juce_TextEditor.cpp:

int TextEditor::getTextHolderHeight()
return textHolder ? textHolder->getHeight() : 0;

Same can be done for getTextHolderWidth() (but in my case I did not needed it).

Is this a correct approach?


Good point - I’ll add something to do this…