直接访问的TableLayoutPanel单元格 [英] Direct access to TableLayoutPanel Cells

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

问题描述

我这里的每个单元包含一个单面板一个TableLayoutPanel。我想能够直接访问单元按行和列中的任一项,做一些到面板中它。我不能为我的生活弄清楚,如果我能在细胞中的访问控制。这将是巨大的,如果我可以这样做:

I have a TableLayoutPanel where each cell contains a single panel. I would like to be able to directly access any one of the cells by row and column and do something to the panel in it. I cannot for the life of me figure out if I can access controls within a cell. It would be great if I could do something like:

面板P = layoutPanel.Cell(X,Y).Controls [0]作为面板;

p.dosomethingCool();

但我似乎无法得到这样的访问,即使它似乎喜欢的事,应该是完全可能的。

But I cannot seem to get that kind of access, even though it seems like something that should be quite possible.

推荐答案

我发现它,它是 layoutPanel.GetControlFromPosition(X,Y);

这篇关于直接访问的TableLayoutPanel单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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