09.04.2018 Views

tornadofx-guide

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Wizard<br />

Figure 21.1<br />

Just by looking at the Wizard the user can see what he will be asked to provide, how he can<br />

navigate between the pages and how to complete or cancel the process.<br />

Since the Wizard itself is basically just a normal View , it will respond to the openModal call.<br />

Let's imagine a button that opens the Wizard:<br />

button("Add Customer").action {<br />

find {<br />

openModal()<br />

}<br />

}<br />

Page navigation<br />

By default, the Back and Next buttons are available whenever there are more pages<br />

either previous or next in the wizard.<br />

For Next navigation however, whether the wizard actually navigates to the next page is<br />

dependent upon the completed state of the current page. Every View has a completed<br />

property and a corresponding isCompleted variable you can manipulate.<br />

270

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

Saved successfully!

Ooh no, something went wrong!