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

Discuss GUI programming with the MUI Royale plugin here

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

Postby marko » Sat Feb 04, 2017 9:03 pm

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
marko
 
Posts: 55
Joined: Wed Dec 15, 2010 6:19 pm

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

Postby airsoftsoftwair » Sat Feb 04, 2017 9:31 pm

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.
User avatar
airsoftsoftwair
 
Posts: 2224
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

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

Postby marko » Sat Feb 04, 2017 11:07 pm

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
marko
 
Posts: 55
Joined: Wed Dec 15, 2010 6:19 pm

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

Postby airsoftsoftwair » Mon Feb 06, 2017 9:39 pm

Hmm, MUI programs should automatically remember their size and position, even after a restart. Does this work for other MUI programs on your system?
User avatar
airsoftsoftwair
 
Posts: 2224
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

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

Postby marko » Thu Feb 09, 2017 11:21 pm

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
marko
 
Posts: 55
Joined: Wed Dec 15, 2010 6:19 pm

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

Postby airsoftsoftwair » Sat Feb 11, 2017 12:26 am

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.
User avatar
airsoftsoftwair
 
Posts: 2224
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to MUI Royale

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron