How to make a clickable list?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 8
- Joined: Fri Apr 05, 2024 5:52 pm
How to make a clickable list?
Hello guys,
I need to make a clickable list for an array in LiveCode. The list needs to display the keys of an array and show the thing that corresponds to the key when that key is selected.
geometry dash scratch
Any suggestions?
I need to make a clickable list for an array in LiveCode. The list needs to display the keys of an array and show the thing that corresponds to the key when that key is selected.
geometry dash scratch
Any suggestions?
Last edited by bryonenger on Tue Apr 16, 2024 8:25 am, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: How to make a clickable list?
Hi, and welcome to the forum, as Klaus would say.
Try this stack. It contains a field with a list of letters, as you see. It also contains another list that relates those letters to a word. That second list can be stored anywhere, and accessed in several ways. In this stack it exists as a custom property of the field, named ""arrayData".
Write back with your complaints.
Craig
Try this stack. It contains a field with a list of letters, as you see. It also contains another list that relates those letters to a word. That second list can be stored anywhere, and accessed in several ways. In this stack it exists as a custom property of the field, named ""arrayData".
Write back with your complaints.
Craig
Last edited by dunbarx on Fri Apr 05, 2024 7:41 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: How to make a clickable list?
Rereading, I see you mentioned "array". This does not matter in the overall method I suggested, but if your data is actually an array, there are a few things that may need to be considered.
For example, an array in LC cannot be displayed in a field. Its form prevents this. An array is a type of variable, not actual text. This is not an issue, I mention it only to get us on the same page.
Is your data stored as an actual array variable, or is it really just a list of paired chunks of text?
Craig
For example, an array in LC cannot be displayed in a field. Its form prevents this. An array is a type of variable, not actual text. This is not an issue, I mention it only to get us on the same page.
Is your data stored as an actual array variable, or is it really just a list of paired chunks of text?
Craig
Re: How to make a clickable list?
This sounds like a perfect fit for the tree view widget
Re: How to make a clickable list?
You could also use the built-in treeView widget
Ooops - edited as Sparkout beat me to it lol
Ooops - edited as Sparkout beat me to it lol
-
- Posts: 8
- Joined: Fri Apr 05, 2024 5:52 pm
Re: How to make a clickable list?
I got it. Thanks for your answer