如何在Windows应用程序中执行时添加带按钮的多个标签? [英] How to add multiple labels with buttons at the execution time in windows application ?

查看:73
本文介绍了如何在Windows应用程序中执行时添加带按钮的多个标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我设计了一个Windows应用程序表单,在此我有一个标签和一个与此相关的按钮。我的数据库中有10行(可能是增加或减少,即动态),包含项目名称。现在我想在运行时显示所有项目名称,即根据数据库自动增加或减少标签数量(即,如果数据库中有10个项目,那么它将显示10个项目名称,如果有15个项目,那么它将显示15个项目)在运行时,就像我们在ASP.net中一样,将该标签与数据库绑定。

但是如何在windows应用程序中执行此操作。



谢谢。

Hello,
I have design a windows application form, in this I have a label and a button associated with this. I have 10 rows(it may be increase or decrease i.e. dynamic) in my database which contain items name. Now I want to display all the item names at run time i.e. automatically increase or decrese the number of labels according to database(i.e. if there are 10 items in database then it will show 10 item names, if there are 15 items then it will show 15 items) at run time like we do in ASP.net to bind that label with database.
But how to do it in windows application form.

Thanks.

推荐答案

您好,



您可以在win form应用程序中使用DataRepeater控件。



数据Windows应用程序中的转发器控制 [ ^ ]

http://msdn.microsoft.com/en-us/library/cc4250 07%28v = vs.80%29.aspx [ ^ ]



祝你好运
Hi,

You could use DataRepeater control in win form applications.

Data Repeater Control in Windows Applications[^]
http://msdn.microsoft.com/en-us/library/cc425007%28v=vs.80%29.aspx[^]

Good Luck


这篇关于如何在Windows应用程序中执行时添加带按钮的多个标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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