Page 1 of 1

Multiple Windows

Posted: Wed Jan 16, 2013 7:19 pm
by djrikki
Hi,

Documentation suggests its possible to open multiple windows, but how exactly do I pull this off?

I have tried creating two separate XML files which work correctly individual, but if I use the below...

Code: Select all

mui.CreateGUI(FileToString("gui.xml"))
mui.CreateGUI(FileToString("preview.xml"))
Compile and run the application...

The first window opens briefly (I see it flicker and close) leaving the second window only visible.

Re: Multiple Windows

Posted: Wed Jan 16, 2013 7:21 pm
by djrikki
Just to add both XMLs start with the xmlversion and encoding string followed by the application base... however if I remove <application> and </application> from the second xml the app now fails to run.

Re: Multiple Windows

Posted: Wed Jan 16, 2013 7:24 pm
by djrikki
Nevermind, I get it... all gui elements no matter what they are must reside in one xml file.

Re: Multiple Windows

Posted: Sat Apr 13, 2019 7:08 pm
by zenzizenzizenzic
How were you able to get this to work? I keep getting a "ID must be a FourCC!" error everytime I try.

Re: Multiple Windows

Posted: Mon Apr 15, 2019 7:35 pm
by jPV
You can put all window definitions into the same XML file, next to each other under the application tags. For example like this. If you don't want them all displayed at the start, set open="false" for those you want to be hidden, and manually open them when you need.

Another option would be to create a new definition with the mui.CreateObject and then attach it with the Application.AddWindow.

But the "ID must be a FourCC!" is probably related to wrongly defined MuiID.

Re: Multiple Windows

Posted: Tue Apr 16, 2019 4:14 pm
by zenzizenzizenzic
I think that addresses the issue. Thank you!