After seeing some posts in the OO forums, I tried setting the window position/size from a macro I have for opening related document. The code works but the positioning is just off by a little which means I have to use the Window Manager to fix, making the setSizePos
function useless.
Based on what the struct from getContainerWindow()
returned from an existing window,
Dim w: w = e.CurrentController.Frame.getContainerWindow()
print "x=" & w.PosSize.X & " y=" & w.PosSize.Y _
& " w=" & w.PosSize.width & " h=" & w.PosSize.height
I did the following to apply pos/size to another,
Dim w: w = altDoc.CurrentController.Frame.ContainerWindow
w.setPosSize(961,111,958,968,15)
'Coordinates for left side
' x=1 y=111 w=958 h=968
'Coordinates for right side
' x=961 y=111 w=958 h=968
Am I doing something wrong or is this broken/not possible?
Cheers.
EDIT: Edited to clarify what I was trying to do. In essence copy one windowâs pos/size to another.