MultiDocumentPanel problems


I have a component that is a multidocument panel, when i do

addDocument (new MyComponent(), Colours::white, true);

a window (i set the layout to be floating windows) appears and the component is there, a soon as i hit “maximize” on the new window evrything goes away, all components, and the whoel window is empty. i noticed that there is createNewDocumentWindow () method that creates a window but that does not work (nothing happens, the component gets created but no UI changes).

What’s the proper way to create multiple documents with this class ? Should i create a MultiDocumentPanelWindow with createNewDocumentWindow() and then add my component as the content component for this window or just use the addDocument method ? i got confused withc of theese method to use ?

i noticed that this is a display problem, when i maximize i can’t see it but the component exists anyway, i added a closeAllDocuments(true ) menu item and when i run it all components get destroyed and their proper destructor called sa i’ts all ok, just i can’t see anything.


scratch that, just found that i need to call


in the resized() method of my component, and it works.