| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Visual C++ Programming Ask questions about Windows programming with Visual C++ and help others by answering their questions. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to reference text Label outside of Form’s code?
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"; |
|
#2
|
|||
|
|||
|
Re: How to reference text Label outside of Form’s code?
I think you want to change the labale text run time. Make one globle variable and check when button is click then you set the "New text" in labale.
I hope it's help you. |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|