Hello Timothy,
i was also not able to get it work using anchors, i would guess, one corner of the control is allways fixed (anchored) to a border or corner.
as workaround you can do this by coding like:
in the global declaration section of your place something like this
[Procedure MyWindow()
CONSTANT
distanceBorderTop = 20
distanceBorderBottom = 20
distanceBorderLeft = 4
distanceBorderRight = 4
SpaceBetweenButtons = 3
DistanceHorz = distanceBorderLeft + distanceBorderRight + (2 * SpaceBetweenButtons)
DistanceVert = distanceBorderTop + distanceBorderBottom + (2 * SpaceBetweenButtons)
END
ST_Button is structure
btn is Control
END
garrButtons is array [3,3] of ST_Button
garrButtons[1,1].btn <- BTN_TopLeft
garrButtons[1,2].btn <- BTN_TopCenter
garrButtons[1,3].btn <- BTN_TopRight
garrButtons[2,1].btn <- BTN_CenterLeft
garrButtons[2,2].btn <- BTN_CenterCenter
garrButtons[2,3].btn <- BTN_CenterRight
garrButtons[3,1].btn <- BTN_BottomLeft
garrButtons[3,2].btn <- BTN_BottomCenter
garrButtons[3,3].btn <- BTN_BottomRight
Create also a procedure in your window like
Procedure actOnReSize()
btnWidth is int = (WinInWidth(WIN_Main) - DistanceHorz) / 3
btnHeight is int = (WinInHeight(WIN_Main) - DistanceVert) / 3
FOR x = 1 TO 3
FOR y = 1 TO 3
garrButtons[x,y].btn..Width = btnWidth
garrButtons[x,y].btn..Height = btnHeight
garrButtons[x,y].btn..X = distanceBorderLeft + ((x-1) * SpaceBetweenButtons) + ((x-1)*btnWidth)
garrButtons[x,y].btn..Y = distanceBorderTop + ((y-1) * SpaceBetweenButtons) + ((y-1)*btnHeight)
END
END
in the end of initialization section of your window
actOnReSize()
add the resizing-event to your window and place there also
actOnReSize()
thats all, maybe there is a better solution
meikl
