ID:139743
 
Code:
I have a feeling that the problem is simple and I just don't see it due to all the coding I have been doing lately.
client
New()
winset(src,"default","size=710x710")
..()
mob
player
Login()
..()
winset(src,"default","size=1200x800") //to answer possible questions, this line works.
winset(src,"default.child1","anchor2=100,100")
winset(src,"default.child1","anchor2=[100],[100]")
winset(src,"default.child1","anchor2='100,100'")
winset(src,"default.child1","anchor2='[100],[100]'")


Problem description:

Using winset() to apply an anchor is simply not working.
I tried several different ways, the window was still not anchored.

The reason I need to do this at all is actually a workaround of a completely different problem.(described below)

Problem #2 description:

The original(less important) problem was the anchor(set in the interface editor) was holding the anchored window against the right side of the screen after the re-size. This overlapped some of my interface. The intended location to anchor it was 19-pixels away from the side. My guess was that the anchor was being applied when the window was too small, so I wanted to anchor it after the player was off the login screen and in the game when the screen was normal size.
anchors become read only at runtime :P
In response to Masschaos100
Well now I'm back to my original problem. When I shrink the window to hide the useless UI elements, like the stats during character selection, my anchor to the child holding my stats window applies itself to the right side of my screen and not where I put it.(19 pixels away from the edge to make room for border graphics)
In response to Cybersnake15
There are options to automatically hide those panels within the coding language you can look them up.

Or if you are using an interface fully like me you could always just make a blank pane or something and have that set as default for child and make it change. then voolah
In response to Midgetbuster
My entire character select/create system is using the interface. The child that holds it all is only 710x710 and I wanted the effect of a login screen.
I created the problem in a demo.
http://files.byondhome.com/Cybersnake15/Problem%20Demo.png
world
mob = /mob/loginmob
view = 10
turf
icon = 'grass.dmi'

client
New()
winset(src,"default","can-resize=false")//Disables resizing
winset(src,"default","statusbar=false")//Disables the status bar
winset(src,"default","size=600x600")//Crops out the login window
..()
mob
loginmob
icon = 'base.dmi'
verb
loginbutton()
set hidden = 1
winset(src,"default","can-resize=true")//Enables window resizing
winset(src,"default","statusbar=true")//Enables the status bar
winset(src,"default.loginchild","is-visible=false")//hides the login child to show the map
winset(src,"default","size=1024x768")//Reveals the game window
var/mob/player/M = new(locate(15,15,1))
M.name = src.key
M.icon = src.icon
src.client.mob = M
del(usr)
player
verb
Say(M as text)
view() << "[M]"
In response to Cybersnake15
Hmm, im not quite sure what your getting at fully, ill counter your screenshot with one of my own interface and see what i get as a response. (this is a dodgy shot btw)

My interface uses a number of childs. your default window that contains 2 childs one for the left hand side and one for the right hand side, pretty standard. then inside those panes are more childs that contain the map for left and ooc for bottom left. then on the right the default setting would be the blank pane (as shown in the image) and on login a proc swaps it to the correct pane (in this case, battle log, inventory and stats)

Furthermore with the anchoring as far as i can see that pane would be on the right hand side but since you (by the looks of it) have a giant interface default it resizes according to that main pane. so naturally it would become weird.

http://img832.imageshack.us/img832/9939/dodgyface.png
^^ sorry i dont have a membership so i cant put it on my hub otherwise i would but moneys tight atm (no job and all)
At present, anchors cannot be set at runtime except for newly-created controls. This is documented in the skin reference.

Lummox JR
In response to Lummox JR
My problem has been solved.
Schnitzelnagler contacted me through the pager. After I explained exactly what it was I wanted he suggested that I place my main game window in a child element and use that to switch from login screen to game screen.
That works as long as I change the child to my game screen AFTER I re-size my window.
world
mob = /mob/loginmob
view = 10
turf
icon = 'grass.dmi'

client
New()
winset(src,"default","can-resize=false")//Disables resizing
winset(src,"default","statusbar=false")//Disables the status bar
winset(src,"default","size=600x600")//Properly sizes the login window
..()
mob
loginmob
icon = 'base.dmi'
verb
loginbutton()
set hidden = 1
winset(src,"default","can-resize=true")//Enables window resizing
winset(src,"default","statusbar=true")//Enables the status bar
winset(src,"default","size=1024x768")//Resize to fit game window
winset(src,"default.mainchild","left=gamewindow")//must happen after resize
var/mob/player/M = new(locate(15,15,1))
M.name = src.key
M.icon = src.icon
src.client.mob = M
del(usr)
player
verb
Say(M as text)
view() << "[M]"