Nik

Nik

  • NA
  • 1
  • 14.4k

Change label's text

Feb 3 2011 11:06 AM
Hello,

I have form Form1 and it have some labels. When I click on one of them, it calls new pop-up form frmPopUp. This form also has Label, which text when I click it must be inserted into label's text that called form frmPopUp. Events handlers:
        public void Label_Click(object sender, System.EventArgs e)       
 {   
         Control label = (Control)sender;           
 AddPopUpForm()
       }
        public void frmPopUp_Label_Click(object sender, System.EventArgs e)        
{            
Control label1 = (Control)sender;           
  label.Text = label1.Text; // -->?                 
    }

I don't know how to access Label, that calls form frmPopUp and pass to it text from label, that was clicked on frmPopUp form.

Answers (2)