Log in

View Full Version : Tutorial on creating custom controls for SmartDashboard 2 (SFX)


BradAMiller
25-01-2014, 17:02
Some of you have been asking how to create controls for the new SmartDashboard (sfx). Controls can be created either using java for complex controls or FXML for simpler visualizations. We created a tutorial that shows how to create a widget that models a pneumatic cylinder that is shown either in or out using a boolean value.

We'll add an example of a java-based widget soon.

The tutorial can be found here:

http://wpilib.screenstepslive.com/s/3120/m/7932/l/170252-creating-a-custom-control-using-fxml

Brad & Patrick

Spaghetti
28-01-2014, 21:55
Is there any kind of wysiwyg editor for this markup available, or barring that, a quick and easy way to see your changes as you iterate on them (like a standalone viewer with a refresh button?).

BradAMiller
28-01-2014, 22:00
There is a tool from Oracle called Scene Builder that is freely available. We used it to create the FXML that is shown in the example. You can find it on the Oracle JavaFX page.

Spaghetti
29-01-2014, 01:18
That's perfect, thanks Brad!