TreeViewItem's callback Which can behave like resized

Hello dear juce friends,

I want to update text when treeview’s component is resized inside treeViewItem.
Is there any callback which can behave similar to resized() of other component ?

Thank you.

If you need complicated behaviour, you can embed a custom component in each tree item, and do whatever you need with it.

You are right, I can use custom component or the component returned by the TreeViewItem itself.

But currently i have done something like this, used member variable for defaultWidth and whenever it changes in paintItem() callBack for TreeViewItem, i call it like resized() . And it is giving me expected behavior.

But i want to ask, is it right and efficient way to do so? Thanks for your reply.

Yes, that’d work fine.