问题描述
我是新的C#.NET。
有人能帮助我下面的问题:
我在我的WindowsForm应用程序,其中的标签页动态生成一个TabControl。要显示的每个选项卡上的内容会从我的数据库中获取。我需要某种形式的控制(可显示所取得的数据),我可以在每个标签页(这将是相同的所有选项卡)上添加这样我可以某种事件联系起来,说一下,在该增加的控制。
谁能告诉我如何以编程方式与放做到这一点;为增加的所有控件编写的单击事件?
I am new to C# .NET.
Can some one help me out with the below problem:
I have a TabControl in my WindowsForm application, where the tab pages are generated dynamically. The content to be displayed on each tab would be fetched from my database. I need some kind of control (which can display the fetched data) that I can add on each tab page (which would be same for all tabs) such that I can associate some kind of event, say click, on that added control.
Can anyone tell me how to do this programmatically & write the click event for all the controls added?
推荐答案
请参考以下链接!你会在这方面有更多的细节。
Please refer the below link! You will get more detail in this regard.
的
这篇关于在C#.NET添加控件标签动态生成的的tabcontrol的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!