锚属性无法正常工作 [英] Anchor Property is not working properly

查看:79
本文介绍了锚属性无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有1个表单,并且在其中添加了用户控件..用户控件的anchor属性不起作用,我不知道它正在发生..我也在监视窗口中检查了..父''的锚点属性有效,但孩子的锚点属性无效..

还有其他属性可以更改该属性吗?.plz帮助我..

在此先感谢..

Hi all,
i''ve 1 form and in that we are adding the user controls.. the anchor property of the user control is not working, i dont know y it is happening.. i checked in the watch window also.. the parent''s anchor property is working but the child''s anchor property is not working..

is there any other property to change that one.. plz help me..

thanks in advance..

推荐答案

避免锚点—确实会引起问题!切换到使用DockPadding的组合.您将获得相同的布局,但是无需使用手动定位器即可使用锚定器,并且不会出现锚定器典型的闪烁.您可能需要创建许多中间面板,但这只会提高设计的可维护性.

请在这里找到我的小代码示例:
如何停靠按钮,以便它可以使用以下格式进行调整 [ GUI外观-C#.Net [屏幕分辨率改变时,Zom Out发生故障 [ ^ ].

—SA
Avoid Anchors — they do cause problems! Switch to using combination of Dock and Padding. You will get the same layout, but without manual positioning you need with Anchors and without flicker typical for Anchors. You might need to create many intermediate panel, but it only improved maintainability of your design.

Please find my small code sample here:
how to dock button so that it can adjust with the form[^].

See also:
GUI Apperance - C#.Net[^],
Zom Out malfunctions when Screen resolution changes[^].

—SA


这篇关于锚属性无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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