Collapsible and expandable list field
Mark
mfstuart at cox.net
Fri Jul 18 01:20:51 EDT 2014
I'd like to build a tree list style Datagrid or field control. But I'm stuck on finishing this.
Yeah I know, buy one from the community, but I'd rather build my own.
So far I've built the script that loads the tree list, that will have 3 levels/nodes from a SQLite database.
The collapsible and expandable nodes will have a 16x16 png image at the beginning of the line which has already been imported into the stack and referenced using the imageSource option in the load script.
So far, so good.
But this is where I'm stuck. I don't know how to build the script to collapse and expand a node.
Obviously when a node is collapsed or expanded, it has to "hide" or "show" all its child lines. The selected line could be a 1st level node, which has to collapse or expand the 2nd and 3rd levels.
Again, the tree list is populated from a SQLite database.
The lines without an image will be line types that call another script to load another Datagrid when the user clicks on it.
I've scouted the forum and user list for a solution. I've also looked at the Dictionary stack scripts. They all seem way too complicated. I develop applications using other tools and they already have tree view list contols. So it's a easy-peasy to implement.
I'd sure appreciate help with this.
Thanx,
Mark Stuart
More information about the use-livecode
mailing list