且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过继承表单中的控件循环...

更新时间:2022-05-20 03:42:15

我找到了自己的解决方案。比预期还要早(虽然它仍然花了我一整个上午......)。

我所看到的是我的表格,所有TextBox字段,按钮字段等字段。

但是,它们还没有放在我的表格上,所以它们还没有被添加到表格的控件中。

我实现了 ISupportInitialize 并在 EndInit 中调用该函数。按预期工作。
I found my own solution to this one. Sooner than expected too (although it still cost me an entire morning...).
What I was looking at were the fields of my Form, all TextBox fields, Button fields, etc.
However, they weren''t placed on my Form yet, so they were also not yet added to the Controls of the Form.
I implemented ISupportInitialize and called the function at EndInit. Works as expected now.