2017년 4월 1일 토요일

List viewer


I have a problem with the list viewer. I want to change the elements shown in the list viewer depending on the element selected in a spinner. The problem is: for example if I select an item from the list picker that shows 3 elements in the list viewer and then I select another item from the list picker that shows 2 elements, the third element remains on the third row of the list viewer. I use more lists, each one contains a non-specified number of elements. Whenever I choose an item from the list picker I set the list viewer's elements to the elements contained in one of the lists I created before. Can you help me please ?

-- 
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

-- 




--
I notice in image4.png that you have a for loop ranging from 0 to elements by 1.
Lists in AI2 have indices starting at 1, not 0.

This might be giving you an extra element.

Try starting from 1.

--
Could you post the .aia and enough screen shots to recreate the problem?

--
Likewise with img4, you're adding blank items to your list "listaprovvisoria" which you're then setting as your elements, but then you immediately set the elements to the selection of the spinner, so your list is worthless.

Also, you don't need to use two notifiers.  Just set the right text of each event and use tests in the "After" events to see the response and act upon it.

--

댓글 없음:

댓글 쓰기