Accesing control property via string
osku
✭✭
in ScreenMaker
Hi
I have tried to create a .Net method which I could call from ScreenMaker application. The method should change the index of the tab control which is created in ScreenMaker. The idea is to change the tab automatically when user has clicked a button in current tab. I tried to find how to access the control property via string, so I could just pass the name of the tabControl to .Net method as a string parameter.
I found some help from google and tried to test it in normal FP SDK application before trying to implement that in SM. The example said that this syntax below should do the trick, but I'm only receiving two error messages when building the application.
this.Controls["tabControl1"].SelectedIndex = 2;
Error 1 The best overloaded method match for 'System.Windows.Forms.Control.ControlCollection.this[int]' has some invalid arguments
Error 2 Argument '1': cannot convert from 'string' to 'int'
Does anyone know what I'm doing wrong? Or is there any other way to access controls made in ScreenMaker?
-Osku
0
Comments
-
Hi,The property which takes a string as parameter is noy available in the Compact Framework, only in the Full Framework.What you could do is iterate thoruch the control list to find for the Tab Control (this could work as long as there is only one tab control)BRCarlos Martinez
ABB0 -
Hi,
I am also searching for this kind a information. If any one have any suggestion
please share and help us.
Thanks!_________________
Hacking
courses
0 -
Thanks Carlos, I'll try that!-Osku0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings