Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to reference text Label outside of Form’s code?

Status
Not open for further replies.

jimboBmiJ

Programmer
Jul 21, 2009
1
AU
How do I reference (+ change) the Label that has been set, outside the Form's code. Eg. Another cpp or header file?

Code Sample 1:

//Set Label.
this->TextLabel1= (gcnew System::Windows::Forms::Label());

Code Sample 2:

//When Button Clicked....
TextLabel1->Text = "Button has been pressed";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top