Don’t forget that those components can be created at any time - e.g. when the treeview gets resized and needs more rows, when it scrolls, etc., so are you sure you want the label to always appear?
But I guess what I’d do would be to use the parentHierarchyChanged callback to show the editor when it gets put on the screen.
Is this still the recommended way to handle this or have things changed for this exact task? I’m using the componentParentHierarchyChanged() callback within a ComponentListener subclass to show the editor after the TreeViewItem is created but jassert (isShowing() || isOnDesktop()) is thrown in Component::grabKeyboardFocus() (with both conditions being false). Same when using componentVisibilityChanged().