Android Question Can FlexibleTable display a tree list?

Diceman

Active Member
Licensed User
I want to display a tree similar to one of the following:
TreeTableView https://www.b4x.com/android/forum/threads/treetableview.81611/
TreeView https://www.b4x.com/android/forum/threads/class-treeview-class-tree-and-node.19082/

But I'd really like to loosely replicate one of the above views using Flexible Table
https://www.b4x.com/android/forum/threads/class-flexible-table.30649/

I will need to fill the tree from a local Sqlite table or from a jRDC2 server using CSV. I'd like it to work in B4A and B4i. B4J would also be of benefit.

My questions are, how difficult would it be to have Flexible Table to:

1) Indent the tree node & icon (both in the 1st column) according to the depth of the node in the tree? The "icon" can be an Awesome or Material symbol to represent the ">".

2) Allow user to click on the ">" tree node icon to expand the branch of the tree? In other words, can additional rows be added from the Sqlite table when the user clicks on the node to expand it? I don't want to rebuild the entire tree just to add 3 or 4 subnodes. (Or can rows be hidden and unhidden when the branch is expanded?)

Updating the tree after it has been built will also allow me to build the "tree" using the local Sqlite database and then update it by contacting the jRDC2 server to get CSV data to display the latest data.

What do you think? Is this possible?
Or am I barking up the wrong tree? (Sorry, couldn't resist) :rolleyes:

TIA
 

klaus

Expert
Licensed User
Longtime User
My questions are, how difficult would it be to have Flexible Table to:
Very very complicated.
Flexible Table is based on lines with Labels.
The lines are loaded dynamically when scrolling.
It would need a specific variable type and a specific treatment for the first column.
Or am I barking up the wrong tree?
Perhaps, even the wrong forest.
 
Last edited:
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Who feels affection for a hammer to the point of calling it after screwdriver?
 
Upvote 0

Diceman

Active Member
Licensed User
Very very complicated.
Flexible Table is based on lines with Labels.
The lines are loaded dynamically when scrolling.
It would need a specific variable type and a specific treatment for the first column.

Perhaps, even the wrong forest.

I'll take a look to see how complicated it is. If it can't be done, then I'll write my own custom view. But before doing that I thought I'd look around to see what was available.
 
Upvote 0

Diceman

Active Member
Licensed User
Who feels affection for a hammer to the point of calling it after screwdriver?
American "carpenters", and I use that term loosely, would use a hammer to drive a screws into the wood at the proper location so it would stand upright, then move the board into position and use their power drill to drive it home. It saves a lot of time and your fingers when driving wood screws. But if my woodshop teacher ever caught me doing that, I'd be given a month's detention, and deservedly so.
 
Upvote 0
Top