PropertyPanel only displaying first property in list

Hi Jucers,

I am having an issue with displaying properties in PropertyPanel. For some reason, when I add an array, only the 1st item is displayed.

Here is my code:

Array<PropertyComponent*> props;
props.add(new AutoLoadProperty());
props.add(new AutoSaveProperty());

m_propertyPanel.addProperties(props);
addAndMakeVisible(m_propertyPanel);

Here’s what it looks like:

It seems that the correct height is being used for both properties so not sure why only the first one is being being displayed (Auto save is missing)?

After some testing, I discovered that I could add items one at a time using the following code:

{
	Array<PropertyComponent*> props;
	props.add(new AutoLoadProperty());
	m_propertyPanel.addProperties(props);
}
{
	Array<PropertyComponent*> props;
	props.add(new AutoSaveProperty());
	m_propertyPanel.addProperties(props);
}
addAndMakeVisible(m_propertyPanel);

Here’s what that looks like:

This workaround is a bit clunky so was wondering if anyone knows why I am having this issue when adding multiple properties?

Cheers,

Chris

I can’t see anything obviously wrong there. Could something be going wrong when you calculate the size of the panel? Perhaps it’s worth checking your resized() function to ensure that enough space is being given for the second property component.