My goal is to allow the user to add a new item to a tree, and give focus to that item’s component so that the user may begin editing it. My code in createItemComponent() looks something like this:
createItemComponent(){
Label *label= new Label("NewLabel", "");
label->showEditor();
return label;
}
The editor shows, but without focus. It looks like it’s losing focus when addAndMakeVisible is called on it in TreeViewContentComponent::updateComponents(). Is there any way to give it focus outside of createItemComponent?