Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
148 user(s) are online (112 user(s) are browsing Forums)

Members: 0
Guests: 148

more...

Headlines

 
  Register To Post  

MUI : is it possible to resize window programmatically ?
Just can't stay away
Just can't stay away


See User information
Hello all,
I have again a MUI question, yes again...

Is it possible to resize a MUI window by code in C ?

For example, my program SysMon consists of a RegisterGroup with many tabs.
When a tab is opened, the window is scaled depending of the gadget inside the tab.
Normal.

But when I go to another tab who is littler, the window is not resized and keep the previous big size.

Therefore, Is somebody knows if it's possible to resize the window after initialization, by code ?

For example, the problem is very visible between Windows tab and Ragemem tab in SysMon :
http://eu.os4depot.net/share/utility/workbench/sysmon.lha

I hope that it's possible,
And thanks you by advance for your kind help.

Go to top
Re: MUI : is it possible to resize window programmatically ?
Just popping in
Just popping in


See User information
Quote:
Is it possible to resize a MUI window by code in C ?


Short answer: no
Long answer: no, because this absolutely contradicts the basic MUI philosophy of letting the user choose the GUI size.

Even if you think that a part of the GUI is too "small" compared to other parts this is only your opinion. Others might think different. And having a constantly self-resizing window is quite annoying. Even if MUI will resize windows sometimes this will only be done if this is really absolutely necessary to layout all objects with their minimum required size.

Quote:
For example, my program SysMon consists of a RegisterGroup with many tabs.
When a tab is opened, the window is scaled depending of the gadget inside the tab.
Normal.

But when I go to another tab who is littler, the window is not resized and keep the previous big size.


Then you better restructure the GUI to make both pages more similar and hence use a similar amount of space.

However, with MUI4 (and probably with the next update of MUI 3.9 already) it will be possible to force virtual groups to a specific size using the MUIA_Virtgroup_TryFit attribute while still allowing the GUI to be resizeable. But I really doubt this will be the thing you are looking for.

Go to top
Re: MUI : is it possible to resize window programmatically ?
Home away from home
Home away from home


See User information
@zzd10h
Well, you can do this, but I'm not sure it helps your problem:
Quote:
set(windowObject, MUIA_Window_Width , width)
set(windowObject, MUIA_Window_Height, height)

Author of the PortablE programming language.
Go to top
Re: MUI : is it possible to resize window programmatically ?
Just can't stay away
Just can't stay away


See User information
Thboeckel :
Thank you again for your help,
I suspected that it was not compatible with the MUI philosophy...
But I'm creating another tab who is really bigger than others tabs, therefore it's really annoying to have to manually resize the others tabs.

ChrisH :
Yes, it was something like that that I was looking for.

But according to the AutoDocs, MUIA_Window_Width is just
Gettable and specifiable during Initialization.
http://www.sasg.com/mui/autodocs/MUI_Window.html#MUIA_Window_Width

I will try it this evening by specifying fixed size.

thank you, too, for your help.


Go to top
Re: MUI : is it possible to resize window programmatically ?
Just popping in
Just popping in


See User information
Quote:
I will try it this evening by specifying fixed size.


This will most probably not archive the result you are intending, because MUIA_Window_Width/Height represents either a pixel or a percentage (of the screen's dimension) value. Enforcing a fixed pixel width is an absolute no-go for font sensitive GUIs. And enforcing a fixed percentage of the screen dimensions is equally bad if there is really not that much content in some parts of the GUI.

Go to top
Re: MUI : is it possible to resize window programmatically ?
Home away from home
Home away from home


See User information
Quote:
But according to the AutoDocs, MUIA_Window_Width is just Gettable and specifiable during Initialization

Ah. I know that code works *before* the window is actually opened, since that is what AmiSystemRestore does. No idea if it works after the window is opened!

Author of the PortablE programming language.
Go to top
Re: MUI : is it possible to resize window programmatically ?
Just can't stay away
Just can't stay away


See User information
ChrisH :
I have just tested and it works inside the code, but just sometimes... The majority of the time only a dimension is modified...

Therefore, I will have to work on the hardest part, to review my GUI.

Thank you all.


Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project