Jul 13, 2017 Replies: 6 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. Code: Dim tti As TreeTableItem tti.Initialize("tt", Array("Column 0 value", "Column 1 value", "Column 2 value")) TreeTableView1.Root.Children.Add(tti) 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. Attachments TreeTableViewExample.zip TreeTableViewExample.zip 2.6 KB · Views: 2,109 TreeTableView2ndExample.zip TreeTableView2ndExample.zip 4.1 KB · Views: 2,219 Click to expand...
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. Code: Dim tti As TreeTableItem tti.Initialize("tt", Array("Column 0 value", "Column 1 value", "Column 2 value")) TreeTableView1.Root.Children.Add(tti) 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.
LWGShane Well-Known Member Licensed User Longtime User Jul 13, 2017 #3 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"): Spoiler: Error 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 _treetableview1.setRowHeight(50); ^ symbol: method setRowHeight(int) location: variable _treetableview1 of type TreeTableViewWrapper
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"): Spoiler: Error 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 _treetableview1.setRowHeight(50); ^ symbol: method setRowHeight(int) location: variable _treetableview1 of type TreeTableViewWrapper
Erel B4X founder Staff member Licensed User Longtime User Jul 14, 2017 #4 I see. It will be fixed in the stable version.
Erel B4X founder Staff member Licensed User Longtime User Jul 16, 2017 #5 It should work properly with beta #3.
rraswisak Active Member Licensed User Longtime User Jan 28, 2019 #7 Hi, I found at example-2 has bug when we double-click the column divider to auto width by column text, the panel was missing ! This has been reported in this thread Thank you
Hi, I found at example-2 has bug when we double-click the column divider to auto width by column text, the panel was missing ! This has been reported in this thread Thank you