…Hi, what should I do to add a content component to a newly created window?
I’ve got a window but I can’t add a normal component, what is the best way to do that?
Thanks,
Dave.
class DeviceWindow : public DocumentWindow
{
public:
DeviceWindow(const String& name, Colour backgroundColour, int buttonsNeeded, AudioDeviceManager &manager)
: DocumentWindow(name, backgroundColour, buttonsNeeded)
{
The following is illegal, because my windows has no content component:
// addAndMakeVisible(audioSetupComp = new AudioDeviceSelectorComponent(manager, 0, 256, 0, 256, true, true, true, false));
}
void closeButtonPressed()
{
delete this;
}
private:
ScopedPointer<AudioDeviceSelectorComponent> audioSetupComp;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DeviceWindow)
};