RobotStudio event

Array in FPSDK

Options

Hi again..

one more question...From my memory, I used to use arrays in VB6, such as BoxArray, CheckListBoxArray and so on...these array controls are not appeared on FPSDK. Can't I use these? or another way??

Best & Kind Regards,
spaik

Comments

  • RussD
    Options

    Control arrays are not supported in VB.Net.

    Search the topic "control arrays" for suggestions about other ways to identify controls in your controls collection.

    Russell Drown
  • Hi,

    in the new .Net Runtime Environment it seems that Control arrays are working, the following definition is working with .Net 2005 and FP SDK 5.07:

            private ABB.Robotics.Tps.Windows.Forms.Button[] btnGripper1 = new ABB.Robotics.Tps.Windows.Forms.Button[3];
    :

                 for (int i = 0; i < 3; i++)
                 {
                     btnGripper1 = new ABB.Robotics.Tps.Windows.Forms.Button();
                     this.btnGripper1.Size = new System.Drawing.Size(80, 50);
                     this.btnGripper1.Location = new System.Drawing.Point(150 + (90 * i), 80);
                     this.btnGripper1.Text = "P" + Convert.ToString(i + 1);
                     this.btnGripper1.Tag = i;
                     this.btnGripper1.Visible = true;
                     this.btnGripper1.Click += new EventHandler(btnGripper1_Click);
                 }

    The tag item is used in theevent handler to estimate which button was pressed...