B4J Tutorial TreeTableView

TreeTableView is a new control added in B4J v5.80.


TreeTableView is very similar to TreeView where each item has multiple values instead of a single value.

Dim tti As TreeTableItem
tti.Initialize("tt", Array("Column 0 value", "Column 1 value", "Column 2 value"))

The columns are set with the designer or by calling TreeTableView.SetColumns.

Note that unlike TreeView which only works with string items, TreeTableView items can be strings, numbers or nodes.

The second example shows how to use a layout file to create custom items:

Note that the rows heights are explicitly set in this case.
The second example also shows how to iterate over all the items.


  • TreeTableViewExample.zip
    2.6 KB · Views: 1,499
  • TreeTableView2ndExample.zip
    4.1 KB · Views: 1,611


Well-Known Member
Licensed User
Longtime User
This looks to be an awesome control. It also looks way easier than the normal TableView.

However, there's a problem with RowHeight, this is the output from the example project ("TreeTableView2ndExample"):
B4J Version: 5.80 BETA #2
Parsing code. (0.00s)
Compiling code. (0.02s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
B4J line: 22
TreeTableView1.RowHeight = 50
javac 1.8.0_131
src\b4j\example\main.java:158: error: cannot find symbol
symbol: method setRowHeight(int)
location: variable _treetableview1 of type TreeTableViewWrapper