布局面板问题 [英] problem with tablelayout panel
本文介绍了布局面板问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个表格布局面板,它有3行,第一行有一列,我有一个带有两个按钮的工具栏,第三行有一个网格,第一行是绝对值,第二行是绝对值,第三行是自动调整大小
现在在调整大小事件或工具条上.如果我动态更改第一行的大小,则第三行显示奇怪的行为.对于第一行的值,第三行(网格)有时与第一行控件重叠,有时离它太远.
控件
I have a table layout panel it has 3 rows and a column in first row I have a toolstrip having two buttons and in third I have a grid first row is absolute, second is absolute and third is autosize
Now on resize event or toolstrip If I change the size of first row dynamically third row shows odd behavior.For a value of first row ,third row (grid) sometimes overlaps the first rows control and sometimes too far from it .
Is there any problem with the control
推荐答案
您的设计似乎并不那么复杂.
使用控件的Dock
和Anchor
功能而不是TableLayoutPanel
.您将对性能感到满意.
Your design doesn''t seem so complex.
UseDock
andAnchor
features of the controls instead ofTableLayoutPanel
. You''ll be happy with the performance.
这是该面板的固有问题.您可以限制表格的最小大小System.Windows.Forms.Form.MinimumSize
.我建议改为使用常规的System.Windows.Forms.Panel
,其所有子级都使用对接:除System.Windows.Forms.DockStyle
以外的所有System.Windows.Forms.DockStyle
,其中一个与System.Windows.Forms.DockStyle.Fill
一起使用,也应使用Padding
属性.此布局是最稳定的调整尺寸之一.无论如何,您都需要限制System.Windows.Forms.Form.MinimumSize
.
—SA
This is the inherent problem of this panel. You can limit the minimal size of the form,System.Windows.Forms.Form.MinimumSize
. I would recommend using a regularSystem.Windows.Forms.Panel
instead, with all its children using docking:System.Windows.Forms.DockStyle
other thenNone
, with one of them withSystem.Windows.Forms.DockStyle.Fill
, also usePadding
property. This layout is one of the most stable to resize. You will need to limitSystem.Windows.Forms.Form.MinimumSize
anyway.
—SA
您好,
我在程序中动态添加了一个TableLayoutPanel.我想通过单击按钮从该tableLayoutPanel中删除行.
请帮我.非常紧急.
谢谢.
Hello,
I added one TableLayoutPanel in my program dynamically. I want to delete row from that tableLayoutPanel by clicking button.
Please help me. Its very urgent.
Thanx in advance.
这篇关于布局面板问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文