{"id":26498751,"url":"https://github.com/jo-tools/treeview","last_synced_at":"2026-01-31T13:43:25.836Z","repository":{"id":42707667,"uuid":"468101994","full_name":"jo-tools/treeview","owner":"jo-tools","description":"Xojo example project: Tree View","archived":false,"fork":false,"pushed_at":"2025-03-15T16:14:41.000Z","size":2707,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T16:34:13.296Z","etag":null,"topics":["control","listbox","xojo"],"latest_commit_sha":null,"homepage":"https://www.jo-tools.ch","language":"Xojo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jo-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/jotools"]}},"created_at":"2022-03-09T21:47:39.000Z","updated_at":"2025-03-15T16:12:37.000Z","dependencies_parsed_at":"2025-03-15T16:31:55.405Z","dependency_job_id":"18739a6a-6ee9-4e4c-923c-5d1aee16c51f","html_url":"https://github.com/jo-tools/treeview","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-tools%2Ftreeview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-tools%2Ftreeview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-tools%2Ftreeview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-tools%2Ftreeview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jo-tools","download_url":"https://codeload.github.com/jo-tools/treeview/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244631866,"owners_count":20484645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["control","listbox","xojo"],"created_at":"2025-03-20T14:39:53.984Z","updated_at":"2026-01-31T13:43:25.750Z","avatar_url":"https://github.com/jo-tools.png","language":"Xojo","funding_links":["https://paypal.me/jotools"],"categories":[],"sub_categories":[],"readme":"# Tree View\nXojo example project\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\n## Description\nHierarchical Listboxes are a bit tricky with Xojo. This example project shows\na reusable approach:\n- A class named ```CTreeListedValues```.  \n  This is basically a simple List with a couple of properties: ```name, hint, key, status, data, sublist```. The ```sublist``` is just another instance of a ```CTreeListedValues``` list, allowing you to build a hierarchical structure.\n- A Control subclass ```lstTreeView```.\n  All the required \"magic\" in Xojo's Listbox is handled here.  \n  You just need to assign your hierarchical ```CTreeListedValues``` list,\n  and this Subclass takes care of:\n  - Populate the Control to show the hierarchical data\n  - Expanding/collapsing logic *(all rows; just a single branch)* and\n    contextual menus\n  - Updates the ```CTreeListedValues``` list according to the current state\n    *(row expanded/collapsed; user requested to change a status of an entry)*\n\nYou can assign icons for all the item statuses you have. And the example shows how to change the status of the items by pressing a key and/or create a contextmenu (or do it in your code: modify the ```CTreeListedValues``` and update the Listbox).\n\n### An example usage in a productive application\nWe fill a ```CTreeListedValues``` while scanning the differences between a database and a user's offline working-copy (file). The tree is then displayed to the user to show which items are going to get synchronized and in which direction (db -\u003e file, db \u003c- file). The user can interact if needed *(e.g. change the direction of some entries, or ignore a whole branch)*. Finally, the always updated ```CTreeListedValues``` *(such as confirmed and/or modified by the user)* are being used as the 'Task-list' for the main synchronization-task... \n\n### ScreenShots\nTreeView: Example app - macOS  \n![ScreenShot: Example App macOS](screenshots/TreeView_macOS.png?raw=true)\n\nTreeView: Example app - Windows  \n![ScreenShot: Example App Windows](screenshots/TreeView_Windows.png?raw=true)\n\n## Xojo\n### Requirements\n[Xojo](https://www.xojo.com/) is a rapid application development for Desktop, Web, Mobile \u0026 Raspberry Pi.  \n\nThe Desktop application Xojo example project ```TreeView.xojo_project``` is using:\n- Xojo 2024r4.2\n- API 2\n\n### How to use in your own Xojo project?\n1. Copy and paste the folder ```treeview``` *(containing the classes ```CTreeListedValues``` and ```CTreeItem```, as well as the Listbox Subclass ```lstTreeView```)* to your project.\n2. Place an instance of the ListBox subclass ```lstTreeView``` on a Window.\n3. Have a look at how the example projects is using the provided Methods.  \n   - Build and show a Tree: ```Window1.Tree_Setup```\n   - Handle Events: ```Window1.lstTree```\n\n## About\nJuerg Otter is a long term user of Xojo and working for [CM Informatik AG](https://cmiag.ch/). Their Application [CMI LehrerOffice](https://cmi-bildung.ch/) is a Xojo Design Award Winner 2018. In his leisure time Juerg provides some [bits and pieces for Xojo Developers](https://www.jo-tools.ch/).\n\n### Contact\n[![E-Mail](https://img.shields.io/static/v1?style=social\u0026label=E-Mail\u0026message=xojo@jo-tools.ch)](mailto:xojo@jo-tools.ch)\n\u0026emsp;\u0026emsp;\n[![Follow on Facebook](https://img.shields.io/static/v1?style=social\u0026logo=facebook\u0026label=Facebook\u0026message=juerg.otter)](https://www.facebook.com/juerg.otter)\n\u0026emsp;\u0026emsp;\n[![Follow on Twitter](https://img.shields.io/twitter/follow/juergotter?style=social)](https://twitter.com/juergotter)\n\n### Donation\nDo you like this project? Does it help you? Has it saved you time and money?  \nYou're welcome - it's free... If you want to say thanks I'd appreciate a [message](mailto:xojo@jo-tools.ch) or a small [donation via PayPal](https://paypal.me/jotools).  \n\n[![PayPal Dontation to jotools](https://img.shields.io/static/v1?style=social\u0026logo=paypal\u0026label=PayPal\u0026message=jotools)](https://paypal.me/jotools)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo-tools%2Ftreeview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjo-tools%2Ftreeview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo-tools%2Ftreeview/lists"}