[MaxGUI] Move window after creating it?

BlitzMax Forums/BlitzMax Programming/[MaxGUI] Move window after creating it?

ImaginaryHuman(Posted 2006) [#1]
Is it possible that after creating a window with MaxGUI, you can call some command that will move the window to new coordinates and resize it to some given amount? ie without the user using the mouse, and without maximize/minimize?


kfprimm(Posted 2006) [#2]
SetGadgetShape?


ImaginaryHuman(Posted 2006) [#3]
Um, yah, just came back here to mention that I found that command and it works. :-D lol MaxGUI newbie, forgive me.

Not an *entirely* intuitive command name, though, but that's because I don't think of a window as a gadget.


kfprimm(Posted 2006) [#4]
thats alright, we were all there at some point....SetGadgetShape gadget:TGadget,x,y,width,height


ImaginaryHuman(Posted 2006) [#5]
Thank you !

It's interesting that when the window is maximized, it's not necessarily as big as it *could* be if you make it the size of the desktop. On the Mac it only maximizes to the size of the desktop that doesnt include the dock.


Grisu(Posted 2006) [#6]
I highly advise not to use Setgadgetshape for resizing a window. This will probably cause multiple errors!
You have been warned.

Example of one:
http://www.blitzbasic.com/Community/posts.php?topic=59133


ImaginaryHuman(Posted 2006) [#7]
Seems like that problem is currently only to do with list boxes not updating right. It's understandable that you'll probably need to update all of your window contents after a resize. All I have on my window is a canvas, anyway, no gadgets. It doesn't seem to cause me any errors since I update the canvas at the earliest opportunity.


Grisu(Posted 2006) [#8]
It does. Just enable "show window contents while resizing" on windows (don't know how they call it in the english version of windows). And you will see, how everything is messed up.


ImaginaryHuman(Posted 2006) [#9]
Oh. Well if you are switching ON the problem then what can you expect :-)

In my case I only have a canvas covering the whole client area of the window so there is no problem with resizing.


Grisu(Posted 2006) [#10]
Then be happy!

Come back when you have a listbox, textarea, 2 labels, 2 canavas, 3 buttons and a combobox on screen... :)