When I dock a window on the top or bottom the window height doesn't seem to be controllable.... left and right work correctly. This window (form) has buttons that I rearrange in the before dock method (shown below). I want the docked window size to be the height of the buttons+4 (like a toolbar) but it seems to default to 1/2 of the screen.
Any ideas are always appreciated...
Andy Snyder
SnyAc Software Services
Code:
LPARAMETERS nLocation
WITH THISFORM
LOCAL nBtnSize,nLocation,nButtons
nButtons=IIF(.dunnage.visible,9,8)
DO CASE
CASE nLocation=1 .OR. nLocation=2 && left or right
.height=_screen.height
nBtnSize=(_screen.height-.imglogo.height-nButtons*2-20)/nButtons
.Specification.Height=nBtnSize
.command2.height=nBtnSize
.dunnage.height=nBtnSize
.command9.height=nBtnSize
.command5.height=nBtnSize
.statusinquiry.height=nBtnSize
.inventory.height=nBtnSize
.itemanalysis.height=nBtnSize
.plantview.height=nBtnSize
.Specification.LEFT=2
.Specification.top=2
.command2.LEFT=2
.command2.TOP=.Specification.TOP+.Specification.HEIGHT+2
.Dunnage.LEFT=2
.Dunnage.TOP=.command2.TOP+.command2.HEIGHT+2
.command9.LEFT=2
.command9.TOP=IIF(.Dunnage.VISIBLE,.Dunnage.TOP+.Dunnage.HEIGHT+2,.Dunnage.TOP)
.command5.LEFT=2
.command5.TOP=.command9.TOP+.command9.HEIGHT+2
.imglogo.visible=.T.
.imglogo.height=nBtnSize
.imglogo.width=nBtnSize
.imglogo.LEFT=.WIDTH/2-.imglogo.WIDTH/2
.imglogo.TOP=.command5.TOP+.command5.HEIGHT+2
.statusinquiry.LEFT=2
.statusinquiry.TOP=.imglogo.TOP+.imglogo.HEIGHT+2
.inventory.LEFT=2
.inventory.TOP=.statusinquiry.TOP+.statusinquiry.HEIGHT+2
.itemanalysis.LEFT=2
.itemanalysis.TOP=.inventory.TOP+.inventory.HEIGHT+2
.plantview.LEFT=2
.plantview.TOP=.itemanalysis.TOP+.itemanalysis.HEIGHT+2
.Specification.WIDTH=.WIDTH-4
.command2.WIDTH=.WIDTH-4
.Dunnage.WIDTH=.command2.WIDTH
.command9.WIDTH=.command2.WIDTH
.command5.WIDTH=.command2.WIDTH
.statusinquiry.WIDTH=.command2.WIDTH
.inventory.WIDTH=.command2.WIDTH
.itemanalysis.WIDTH=.command2.WIDTH
.plantview.WIDTH=.command2.WIDTH
OTHERWISE && top or bottom
nBtnSize=40
.height=nBtnsize+4
.width=_screen.width
.Specification.Height=nBtnSize
.command2.height=nBtnSize
.dunnage.height=nBtnSize
.command9.height=nBtnSize
.command5.height=nBtnSize
.statusinquiry.height=nBtnSize
.inventory.height=nBtnSize
.itemanalysis.height=nBtnSize
.plantview.height=nBtnSize
nBtnSize=(_screen.width-nButtons*4)/nButtons
.command2.WIDTH=nBtnSize
.Specification.WIDTH=.command2.WIDTH
.Dunnage.WIDTH=.command2.WIDTH
.command9.WIDTH=.command2.WIDTH
.command5.WIDTH=.command2.WIDTH
.statusinquiry.WIDTH=.command2.WIDTH
.inventory.WIDTH=.command2.WIDTH
.itemanalysis.WIDTH=.command2.WIDTH
.plantview.WIDTH=.command2.WIDTH
.Specification.LEFT=2
.Specification.top=2
.command2.top=2
.command2.left=.Specification.left+.Specification.width+4
.Dunnage.top=2
.Dunnage.left=.command2.left+.command2.width+4
.command9.top=2
.command9.left=IIF(.Dunnage.VISIBLE,.Dunnage.left+.Dunnage.width+4,.Dunnage.left)
.command5.top=2
.command5.left=.command9.left+.command9.width+4
.imglogo.visible=.F.
.statusinquiry.top=2
.statusinquiry.left=.command5.left+.command5.width+4
.inventory.top=2
.inventory.left=.statusinquiry.left+.statusinquiry.width+4
.itemanalysis.top=2
.itemanalysis.left=.inventory.left+.inventory.width+4
.plantview.top=2
.plantview.left=.itemanalysis.left+.itemanalysis.width+4
ENDCASE
ENDWITH
Any ideas are always appreciated...
Andy Snyder
SnyAc Software Services