09.04.2018 Views

tornadofx-guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5. Data Controls<br />

There are a few configurability options, like "expand on double-click" behaviors and<br />

accessing the expanderColumn (the column with the "+" button) to drive a padding (Figure<br />

5.6).<br />

override val root = tableview(regions) {<br />

column("ID",Region::id)<br />

column("Name", Region::name)<br />

column("Country", Region::country)<br />

rowExpander(expandOnDoubleClick = true) {<br />

paddingLeft = expanderColumn.width<br />

tableview(it.branches) {<br />

column("ID",Branch::id)<br />

column("Facility Code",Branch::facilityCode)<br />

column("City",Branch::city)<br />

column("State/Province",Branch::stateProvince)<br />

}<br />

}<br />

}<br />

Figure 5.6<br />

60

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!