Set a text property of TpsLabel
granale
✭
Hello,
_Test.SetValue("3", true);
this.lMode.Text = "Grundstellungsfahrt";
_Test.SetValue("31", true);
I want set the text property of a TpsLabel component. It works on virtual controler very well, but on real controler not. I use RW5.13.0225. See following lines.
_Test.SetValue("3", true);
this.lMode.Text = "Grundstellungsfahrt";
_Test.SetValue("31", true);
In real controler the variable _Test is 3. I get also no exception.
Please, help.
granale
0
Comments
-
The variable must be declare in the controler as PERS.0
-
...yes I know. That is not the problem. My problem is, the 3rd line in my example is never called. But only on real controller!!!!granale0
-
Hi,Is this code running in the UI thread?Carlos Martinez
ABB0 -
...no, it isn't. Is in a subform. But the controller is in UI-Thread. Also the Variable-Object for the change event.granale0
-
The UI can be modified only by code running on a UI thread. Even if the controller was created in the UI thread, all its events are executed in a non-ui thread. If you would want to make a change in the UI, make sure to invoke the UI thread ...Sample Pseudo-code ..// Assumming this code runs inside a TpsFormvoid MyNoUIThread (....){this.Invoke(new EventHandler(this.MyUIThread ), this, EventArgs.Empty));}void MyUIThread (....){// Change of the UI}Carlos Martinez
ABB0 -
Thank you!granale0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings