Unable to set width and height of MUI window, bug?

Discuss GUI programming with the MUI Royale plugin here
Post Reply
marko
Posts: 56
Joined: Wed Dec 15, 2010 5:19 pm
Contact:

Unable to set width and height of MUI window, bug?

Post by marko »

Hi, I have MUI window with id = "window"...

I'm able to read width and height of the window but not set it, HW exits with an error.

MUI Royal doc states that Window.Height -- set/get, so this should be possible...

Am I doing something wrong or is it a bug thanks?

w = mui.Get("window", "width")
h = mui.Get("window", "height")

DebugPrint("w =",w, "h =", h)

mui.Set("window", "width", w)
mui.Set("window", "height", h)


OS: AOS4.1 FEu1
AmigaOS 4.1 on Sam440ep-flex@800MHz
http://www.m4rko.com/amiga
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Unable to set width and height of MUI window, bug?

Post by airsoftsoftwair »

No, that's not a bug. The "set" in the documentation refers to the fact that the tag can be set at initialization time but not later. You can see that by looking at the applicability which is IG, not ISG.
marko
Posts: 56
Joined: Wed Dec 15, 2010 5:19 pm
Contact:

Re: Unable to set width and height of MUI window, bug?

Post by marko »

Ok, thanks for that speedy reply.

But then the question is, is there a way to set a new width and height of the window after initialization.

I ask because although the size is remembered when restarting the program but I want the program to remember the size even after a restart of the OS (I have MUIID set for the window in the xml file).

Maybe I have missed something, or is it not possible..?
AmigaOS 4.1 on Sam440ep-flex@800MHz
http://www.m4rko.com/amiga
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Unable to set width and height of MUI window, bug?

Post by airsoftsoftwair »

Hmm, MUI programs should automatically remember their size and position, even after a restart. Does this work for other MUI programs on your system?
marko
Posts: 56
Joined: Wed Dec 15, 2010 5:19 pm
Contact:

Re: Unable to set width and height of MUI window, bug?

Post by marko »

airsoftsoftwair wrote:Does this work for other MUI programs on your system?
Hmm, nope, none that I can find :S
AmigaOS 4.1 on Sam440ep-flex@800MHz
http://www.m4rko.com/amiga
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Unable to set width and height of MUI window, bug?

Post by airsoftsoftwair »

Then check your MUI prefs settings under "Windows"... there should be an option which says that window positions and sizes should be stored permanently. Tick that.
Post Reply