解决TableLayoutPanel问题 [英] Solve TableLayoutPanel issue
问题描述
private void tableLayoutPanel1_MouseMove(object sender, MouseEventArgs e)
{
try
{
if (resizing)
{
if (rbColumn.Checked)
{
columnStyles[GColumn].SizeType = SizeType.Absolute;
columnStyles[GColumn].Width += e.X - columnStyles[GColumn].Width;
}
}
}
catch (Exception ex)
{
//MessageBox.Show(ex.ToString());
}
}
说明:
放置一个面板,并将其背景图像(如Table(image)和BackColor)导入为透明".然后将tablelayoutpanel放在面板上,并将cellBorderStyle设置为"Single".
我只想在运行时移动tablelayoutpanel中的特定列.
借助我的代码,我在mouseclick事件期间获取了列值.
借助该值,我想在TableLayoutPanel_MouseMove
事件期间移动特定的列.(上面的代码已提及)
If Value=2
表示仅需要移动第二列.但是其移动的第3、4列等等....
Description:
Placed a panel and import its background image like Table(image) and BackColor as "Transparent". Then placed a tablelayoutpanel over the panel and set cellBorderStyle as "Single".
I just want to move specific columns in tablelayoutpanel during runtime.
With the help of my code, I am getting the column value during mouseclick event.
With the help of that value, I want to move the specific column during TableLayoutPanel_MouseMove
event.(Mentioned above code)
If Value=2
means need to move only 2nd column. But its moving 3rd,4th column and so on....
推荐答案
请参阅我对原始问题的回答 ^ ].
并且不要在这里发表评论或回答.在原始线程中执行.
See my answer to your original question here[^].
And don''t comment or answer here. Do it in the original thread.
这篇关于解决TableLayoutPanel问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!