在C#.NET添加控件标签动态生成的的tabcontrol [英] adding a control to tabs generated dynamically in tabcontrol in C# .net

查看:277
本文介绍了在C#.NET添加控件标签动态生成的的tabcontrol的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的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.

http://stackoverflow.com/questions/1084098/creating-a-tab-control-with-a-dynamic-number-of-标签式视觉工作室-C

这篇关于在C#.NET添加控件标签动态生成的的tabcontrol的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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