Add Child Component more weird behavior?

for (int i = 0; i < 8; i++)
    cr.addChildComponent(cr.Notes[i]);

works when used in the pluginEditor.cpp file

doesn’t work when executed in the component constructor of the cr object. Width and Height are inherited but not top-left position.

Here’s more sauce.

In your ChordRoll constructor, you probably want to change getParentComponent()->addChildComponent(this->Notes[i]) to addChildComponent(this->Notes[i]), since in your working PluginEditor code, you are adding the “note” components to the ChordRoll component, whereas in your existing ChordRoll constructor you are adding them to the ChordRoll's parent component.

Tried that. Everything still shows up in the top left corner. The only solution was to call the functions in the editor constructor rather than in the component’s.