Alertwindow addCustomComponent problem


It seems that custom components added to an AlertWindow with addCustomComponent don’t get centered anymore and also have their names printed twice?


I think I changed them to be left-aligned, otherwise there’s no way of lining them up with non-custom comps. But the names seem to be fine as far as I can see?


see attached picture, it displays the name of the togglebutton twice.

this is the code:

[code] AlertWindow w (T(“Export audio files”),
T(“Select a folder name”),

	w.addTextEditor (T("text"), String::empty, String::empty);

	ToggleButton *exportPause = new ToggleButton (T("Export pauses too"));
	exportPause->setTooltip (T("Export pauses (index 0) too"));
	exportPause->setToggleState (false, false);
    exportPause->setSize (140, 24);

	w.addCustomComponent (exportPause);



Well it’s a bit silly to say it displays the name twice! The alertwindow obviously only displays the name once - it has no way of knowing that the component also happens to print its own name inside it!

If you setName(String::empty) on the toggle button, then it won’t display a name for it.