When you set the '.Dock' property for any control you should never have to set the '.Top'/'.Left' properties, the '.Width'/'.Height' properties should not be used if '.Dock = Fill'. If you set these properties after you set the '.Dock' properties you will receive undesirable results.
with '$Panel_dock = 3,"",5' the second panel created is not docked at all and should be docked to the bottom '2'.
also i think that part of what is happening is that the controls are not created in a sequence that is indicative of what you are trying to achieve.
'.Dock' property its self alows a form or container to be resized and the '.Width'/'.Height' properties will automaticly change to sute the size of the container.
maybe i did not say things very well but these are the things that i was trying to show you in this post:
Edited by Benny69 (2006-12-15 05:55 PM)