单击最大化父级MDI表单时如何在MDI child子中实现控件 [英] how to effect controls in mdi childfrom when click maximize parent mdi form
本文介绍了单击最大化父级MDI表单时如何在MDI child子中实现控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好!
我有mdi父母表格和mdichild表格.
当最大化父窗体中的单击时,我想在mdi子窗体中实现(可靠)datagridview.该怎么办?
所以,请让我知道.
致以诚挚的问候,
nwe nwe
hello!
I have mdi parent form and mdichild form.
When maximize click in parent form,I want to effect(resiable) the datagridview in mdi childform.How could I do?
So, pls let me know.
Warmly Regards,
nwe nwe
推荐答案
您还没有告诉您要调整多少尺寸.但是,如果您已将datagridview的DockStyle设置为填充子表单(即如果Datagridview.DockStyle= DockStyle.Fill
),则在最大化或调整子表单的大小时将自动调整其大小.
You haven''t told how much you want to resize. But if you have set DockStyle of datagridview to fill up the child form(i.e, ifDatagridview.DockStyle= DockStyle.Fill
), then it will be automatically resized when you maximize or resize the childform.
private void parentForm_resize(...)
{
Childform.size= Parentform.size;
}
每个控件锚都有一个属性
将控件的anchor属性设置为All
并将属性Dock更改为Fill
Hi,
There is a property for each control Anchor
Set the control''s anchor property to All
And also change the property Dock to Fill
这篇关于单击最大化父级MDI表单时如何在MDI child子中实现控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文