All things Treeview

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Posts: 19
Joined: Mon Apr 03, 2017 6:16 am
Location: Perth, Western Australia

All things Treeview

Post by mrk » Mon Apr 03, 2017 6:52 am

Hello all

I have just purchase LiveCode and am in the process of learning it. What I would like to know (and I know this is probably more advanced than I can handle right now) is if it is possible to create a treeview list like what is in the attached image.
I have an app I created in MS Access and basically the user selects the child entries and they get added to a list. The tree view is pretty much hard coded to require the 6 parent levels then the child entries.
What I would like to know is, is this possible within livecode? I would love for the users to add as many or few parent items as they wish (to suit their specific requirements). The child items are unique and can be added to multiple parent items.
Access Treeview.jpg

VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK

Re: All things Treeview

Post by dave.kilroy » Mon Apr 03, 2017 1:36 pm

Hi @mrk and welcome to the forum :)

Yes you should be able to do something like what you want (I'm not 100% sure what you mean by "The child items are unique and can be added to multiple parent items.")

Check out the 'Tree View' widget - I can't find any online tutorials for it but if you open the dictionary in LiveCode and then click the 'Choose API - LiveCode Script' and select 'Tree View' you'll find enough info to get you started...

Basically the 'Tree View' works with arrays, if you can get your data into an array it 'should' be pretty simple to do

Kind regards

"...this is not the code you are looking for..."

Post Reply

Return to “Talking LiveCode”