i have a form with few panels docked to top,left and fill... And there are two buttons inside a panel... i want to resize the button which should not overlap 开发者_如何学Gowhen form is resized
I you are inside Windows Forms, then this supports obvisouly control nesting. So as you have added and docked your three panels you can then add buttons to these panels and Dock any child elements inside.
For example, if we take what you have described, if we focus on your panel which is Dccked on the left, you could then add the follwing:
ParentPanel = parentPanel1
- Add a Child Panel chdPanel1 to parentPanel1 - Dock Bottom, Padding : All 5
- Add a Child Panel chdPanel2 to parentPanel1 - Dock Fill, Padding : All 5
- Add a Button btn1 to chdPanel1 - Dock Fill
This is just an example, but if you continue with control nesting and docking correctly, you should have no problem in positioning your controls
Andrew
精彩评论