am using c# for windows applications.
am using dynamic linklayer array to print some labels in the form.i get some data from the database i add them in the linklabel array and i print it on the screen.
my problem is how to make that linklabel to work when i select the label.am using the code below but is not working:)
when i run the program it get me an error in the last line i upper.
also in my code is the loop that print on the form the labels.
i thing my error is in the lines that i write.could someone help me.
am using dynamic linklayer array to print some labels in the form.i get some data from the database i add them in the linklabel array and i print it on the screen.
my problem is how to make that linklabel to work when i select the label.am using the code below but is not working:)
Code:
public class Form1 : Form
{
System.Windows.Forms.LinkLabel[] linklabel;
this.linklabel = new LinkLabel[rowsize];
private void linklabelfunction_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
MessageBox.Show("tetininafinsdfns");
}
private void InitializeComponent()
{
this.linklabel[12].LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linklabelfunction_LinkClicked);
}
}
also in my code is the loop that print on the form the labels.
i thing my error is in the lines that i write.could someone help me.
Comment