我需要动态更改RowSpan大小 [英] I need to change a RowSpan size dynamically
本文介绍了我需要动态更改RowSpan大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在检查if循环后,需要将当前在"3"中的行跨度更改为"2".是否可以,如果可以的话,请提供示例代码行来帮助我.
我一直在尝试将tableLayoutPanel移到必须检查条件并进行更改的位置.
位置(695,697)到(3,697)或单元格(2,2)到(0,2)
tableLayoutPanelLogos.Location =新Point(3,697); tableLayoutPanelLogos.BringToFront();
不起作用.任何建议..?
Need to change the Row Span Size which is currently in ''3'' to ''2'' after checking a if Loop. Is It possible , if so can you Please help me with a sample code line.
i have being trying to move the tableLayoutPanel to a location that has to check the condition and change.
Location (695,697) to (3,697) or cell (2,2) to (0,2)
tableLayoutPanelLogos.Location = new Point(3, 697); tableLayoutPanelLogos.BringToFront();
doesn''t works. any sugggestion..?
推荐答案
行跨度
this.tableLayoutPanel.Controls.Add(this.tablepanel,0,2);
(0,2)->行跨度
在表面板中动态添加列
this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,33F));
33F->列大小的百分比
Row Span
this.tableLayoutPanel.Controls.Add(this.tablepanel, 0, 2);
(0,2) -> Row span
Adding Column in Table Panel dynamically
this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F));
33F -> percentage of column size
这篇关于我需要动态更改RowSpan大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文