Skip to main content

Posts

Showing posts with the label layout

ScalaFX: Button positioning with HBox

I'm working on an application, as an excuse to practice my Scala and learn ScalaFX in the process. The application will have several input forms. Most will have action buttons, such as Save and Cancel. While the mobile world is going more and more vertical in its layout, the program I am working on is targeting Windows and Mac platforms. In them, buttons are usually laid out side by side. The ScalaFX HBox layout does exactly that: draws its components in a horizontal sequence. As I work through the different aspects of HBox, I will use this Scala object structure: