调整带有窗口的面板 [英] resize panel with window

查看:104
本文介绍了调整带有窗口的面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在窗框内取一个面板;当我增加或减少窗口的大小时,面板顶棚尺寸的改变;我想动态地调整大小;请帮助我

解决方案

使用 Anchor 属性定义控件如何自动调整为其父控件的大小调整大小.

将控件锚定到其父控件可确保在调整父控件的大小时,锚定边缘相对于父控件的边缘保持在相同的位置.

C#中的锚点属性 [使用锚固和对接属性 [ ^ ]

i take a panel in window frame ;when i increase or decrease the size of window the size of panel canot change ; i want to resize both dynamicaly ;please help me

解决方案

Use the Anchor property to define how a control is automatically resized as its parent control is resized.

Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized.

Anchor Property in C#[^]

A CP article on: Working with Anchoring and Docking Properties[^]


这篇关于调整带有窗口的面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆