RobotStudio event

ListItem Help[MOVED]

Ercan
Ercan
edited January 2014 in Robot Controller
Hi everybody I have a little problem with LisItem. There is a sample below. And I want to change Item2 with a data. I mean I dont want to write manually. Thanks for help
The following example illustrates the data type listitem :

Example 1

CONST listitem list {3}:=[[stEmpty, "Item1"], [stEmpty, "Item2"],
[stEmpty, "Item3"]];

A menu list with Item1....Item3 to use in function UIListView.
Post edited by Jonathan Karlsson on
Tagged:

Comments

  • Hi
    First you needed to define your list as persistant and not constant and then you can change the text using the text item in the record
    Ex.
    PERS listitem list {3}:=[[stEmpty, "Item1"], [stEmpty, "Item2"],
    [stEmpty, "Item3"]];

    ! how to change
    list{1}.text:="your text";

    Hope this was what you needed
    Per Svensson
    Robotics and Vision Specialist
    Consat Engineering
  • Thank you so much for your help. Its working