表格大小调整 [英] Form Resizing

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

问题描述

大家好,

我有一个包含面板(Panel1)和用户Control(uc1)的Windows窗体.该用户控件本身是其他控件(例如:GridEx)的容器.我想将此用户控件重复地垂直加载到panel1中.

我写了以下代码:

Hi guys,

I have a windows form containing a panel(Panel1) and user Control(uc1). This user control itself is a container for some other control (eg:GridEx). I want load this user control vertically into panel1 repetitively.

I wrote following code:

x=0,y=0
uc1.size = new system.drawing.size(400,200)

for i as integer = 0 to n
   me.panel1.controls.Add(uc1)
   uc1.loacation = new system.drawing.point(x,y)
   y=y+200
next



这种编码的问题是,在这种情况下,控件重叠时,GridEx可能会变大.我该如何解决呢?

希望您可以



The problem with this coding is some time the GridEx may be large size in this situation the controls are overlapping.. how can i solve this?

hope u can

推荐答案

使用标准 ^ ]和 ^ ]设置?
What about using the standard Dock [^] and Anchor[^] settings?


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

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