0
Отвечен

Button is not changing state in list.

TuomoHautala 9 лет назад в GUI Editor обновлен Dmitry - support (expert) 9 лет назад 9

In my project i have created a list and list template popup for it.

In template i have button with 2 states.

Problem is that state 2 is not working when i press the button in emulator.

Any solution?

На рассмотрении

Hello!


Send your project to email technical support support@iridiummobile.ru


This behavior of the buttons is linked with the peculiarities of work the element type "List"

As a solution to your problem I can suggest to use item type "Static List". Of course in this case, for each button you have to create a separate popup. But this way you will be able to see all of the states buttons and to use them in the List.

Yes, when you create popups on List via the script everything works fine. In that case, you can use this method.

Yes that is good method. Thanks. :)

In example we can add text to list item like this.

List_1.CreateItem(0, 1, {Text: "Hello List!"});

How can i add different image/icon to each button via script?

You can simply add the "Image" property, like so

List.CreateItem(1,1,{Image:"TEST_1.png"});

List.CreateItem(2,1,{Image:"TEST_2.png"});

List.CreateItem(3,1,{Image:"TEST_3.png"});


That's great!

In a button In GUI editor we can have button which has Image and Icon property.

Is it possible also to add icon via script so i can have image and icon for button?

IR.AddListener(IR.EVENT_START,0,function() // Event is activated at the application launch

{
list = IR.GetItem("Page 1").GetItem("Item 1");// Receive the list identifier and save it in the variable with the name "list".
list.CreateItem(1, 1, {Text: "TV Bedroom"}); // Create item 1 and set the "Text" property "TV Bedroom" for sub element 1
list.CreateItem(2, 1, {Text: "Projector"}); // Create item 2 and set the "Text" property "Projector" for sub element 1
list.CreateItem(2, 2, {Image: 1}); // Set the "Image" property which identifier is 1 for sub element 2
list.CreateItem(3, 1, {Text: "TV Hall"}); // Create item 3 and set the "Text" property "TV Hall" for sub element 1
list.CreateItem(3, 2, {Image: 2}); // Set the "Image" property which identifier is 2 for sub element 3
});

So is there sub element identifier for icon also?


Something like this?:


list.CreateItem(1, 1, {Text: "Text 1});

list.CreateItem(1, 2, {Image: "Image1"});

list.CreateItem(1, 3, {Icon: "Icon1.png"});


Unfortunately the icon set in this way will not work. This functionality is not yet implemented.


Сервис поддержки клиентов работает на платформе UserEcho