How to put a .image in a listitem variable

Hi,

i’m trying out the UIListView command on my controller and i’d like to know if it’s possible to add a custom icon to my listitem variable.

Thanks in advance

Michele

I did this:

LOCAL CONST listitem partProgram{2}:=[[“clapper.gif”,“Clapper”],[“blinking_stop_sign.gif”,“Stop”]];
I put the gifs in the HOME directory. But it never worked…
I did not try again with other image formats, but of course you can.

Hello,
I think that you can’t display icons in the list view, because the current documentation “RAPID Instructions, Functions, and Datatypes” for the “listitem.image” says that this is still not implemented in this software release.

Actually you can!
After some experiments i found out that if the picture is a .bmp file the controller can read it.
You need to put it in the HOME directory and after that you need to restart the controller then in the program you call the file name in the declaration of the variable.
The maximum size of the picture is 24x24 pixel.

I did this:

LOCAL CONST listitem Oggetti{5}:= [[“welding_icon.bmp”,“Esegui programma saldatura”], [“home_icon.bmp”,“Vai a rHome”], [“robot_icon.bmp”,“Vai a rTrasporto”], [“target_icon.bmp”,“Esegui un ToolCheck”], [“cleaning_icon.bmp”,“Esegui una Pulizia”]];

and this is the result with the UIListView instruction:

Michele

Thank you for the update and info. :slight_smile: