Views
2 weeks ago

tornadofx-guide

4. Basic Controls

4. Basic Controls ScrollPane You can embed a control inside a ScrollPane to make it scrollable. When the available area becomes smaller than the control, scrollbars will appear to navigate the control's area. For instance, you can wrap an ImageView inside a ScrollPane (Figure 4.21). scrollpane { } imageview("tornado.jpg") Figure 4.21 46

4. Basic Controls Keep in mind that many controls like TableView and TreeTableView already have scroll bars on them, so wrapping them in a ScrollPane is not necessary (Figure 4.22). Hyperlink You can create a Hyperlink control to mimic the behavior of a typical hyperlink to a file, a website, or simply perform an action. hyperlink("Open File").action { println("Opening file...") } Figure 4.22 Text You can add a simple piece of Text with formatted properties. This control is simpler and rawer than a Label , and paragraphs can be separated using \n characters (Figure 4.23). 47

Guide
guide
GUIDE
GUIDE
GUIDE
Guide
Guide
guiding
GUIDE
guide
guide
Guide
Guide
GUIDE
GUIDE
GUIDE
Guide
Guide
The Guide
guide
Guide
guide
Guide
GUIDE TO
guide
GUIDE
GUIDE
GUIDE
GUIDE
guide