如何在Window窗体应用程序中创建动态LinkLabel? [英] How to create dynamic LinkLabels in Window form application?
本文介绍了如何在Window窗体应用程序中创建动态LinkLabel?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的窗口形式中创建动态链接标签...任何人都可以帮助我???
I want to create dynamic linklabels in my window form...can any one help me???
推荐答案
在表格中填写一个面板并编写以下代码。
Hi,
Take a panel in the form and write the below code.
for(int i=0;i<10;i++)
{
LinkLabel lbl = new LinkLabel();
lbl.Text = "Link Label " + i.ToString();
lbl.Location = new Point(10 + i, 20 + i); // figure the formula which will place the controls in proper position and order
panel1.Controls.Add(lbl);
}
希望它有所帮助。
hope it helps.
这篇关于如何在Window窗体应用程序中创建动态LinkLabel?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文