put window1 inside a class

i want to put a window1 inside ContainerControl or inside a class. I tried to do it, but no results. Any clue you can give me? Test project attached
https://www.dropbox.com/s/r7dr5hmkipdapn9/prueba_clase.xojo_binary_project?dl=0t

You can’t. The window is the top graphical container.

Use folders to organize your project items.

Well, you can add a window to a class as a property of the class. So you can add a property of say “MyWindow” of type Window to a container control or class. Use the constructor method of the container control or class to set the window like such:

Public Sub Constructor(w as Window)
  MyWindow = w
  Super.Constructor
End Sub

It would likely be better to set the window property up as a WeakRef.

You pass a reference to the Window.

ok, thanks for all responses and ideas