[Solved] How do I change list items by selection?

Get help using Construct 2

Post » Tue Feb 09, 2016 9:37 am

Hey Guys!

I made 2 lists.. The first list has 2 choices. The second list has different items for each choice.
Now, I want to appear the right items of the list 2 every time change list 1.

Here is the capx to understand: http://odiusfly.com/List_v1.capx

Any help? Thanks!
Last edited by odiusfly on Tue Feb 09, 2016 10:58 am, edited 1 time in total.
B
48
S
28
G
9
Posts: 215
Reputation: 9,265

Post » Tue Feb 09, 2016 10:12 am

I made an example, but I'm not quite happy with it.
https://drive.google.com/file/d/0B5FlDY ... sp=sharing

I saved the settings of two different ListViews as a JSON. First with Item1,2,3 second with Item4,5,6. The problem is, you save not only the items in it, you save the whole settings of the ListView. So you have set the position of the ListView after loading the JSON or you have to put the ListViews from where you save your datas, on the position where they should be, like I have.
Maybe there is a better solution with arrays and a loop.
B
24
S
3
G
1
Posts: 446
Reputation: 2,155

Post » Tue Feb 09, 2016 10:23 am

A bit of logic, and using the String manipulation system expressions "Tokencount" and "Tokenat" and you are done.

Example capx
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
280
S
104
G
86
Posts: 7,313
Reputation: 84,356

Post » Tue Feb 09, 2016 10:57 am

Awesome!!! : -))) Thank you guys!!!
B
48
S
28
G
9
Posts: 215
Reputation: 9,265


Return to How do I....?

Who is online

Users browsing this forum: S1mon, XMatrix and 13 guests