ID:528443
 
(See the best response by Lummox JR.)
Code:
winset(src,"default","is-default=false")
winset(src,"main","is-default=true")


Problem description:
You see, when I get done using the "default" window I want to make the "main" window my new default, and relieve "default" as my main default window.

The Problem is... When I try this, the "main" window doesn't want to go on to my taskbar like the main "default" window would do. Instead when I close the "default" window and try using the "main" window as my default window (I login from the "default" window and it closes the "default" window after login is successful, and it's suppose to open the "main" window as default.) it doesn't act like a default window should i.e. the Options and Messages window pops up in place as the default window, while the "main" window is open simultaneously, I have to click the Options and Messages window to add the window to my taskbar on my Windows Vista Computer.

This is sort of confusing, and it was hard to word. If you need a further explanation I can record a video for you to see my problem more clearly.
Best response
Changing is-default at runtime isn't really supposed to work. Instead, try using a main window with a child control and you can swap panes in and out.
So lets say I did use a child. If the two windows are both different sizes, I'd have to manually set the size every time they're switched between?
No, they'll stretch (or shrink) to fit the child. Unless you want them to be different sizes, then yes you will.
So in no way can I just change the is-default to true or false, and switch between default windows? That would be way easier..
In response to A. Ness
A. Ness wrote:
So in no way can I just change the is-default to true or false, and switch between default windows? That would be way easier..

Nope. Lummox JR (who is actually on the BYOND staff) is right. You gotta set up a child control.

As it says in the reference:
It is generally not a good idea to change is-default at runtime. Instead, default controls can be more easily placed in a pane that can be moved around. If you want swappable window layouts for the main window, the easiest way to handle that is to use panes as well, and just put a Child control in the main window.