In JavaFX exists the control ToggleGroup. I have installed the SceneBuilder
, version:
Product Version
JavaFX Scene Builder 8.0.0
Build Information
Version 8.0.0
Date: 2015-03-25
Java Version: 1.8.0_40-b25, Oracle Corporation
I can't find this control in the SceneBuilder
:
Can you help me?
Thanks for your help!
Scene Builder is written as a JavaFX application, supported on Windows, Mac OS X and Linux.
When you have created a ToggleButton you can select it in SceneBuilder. Then you will find a field on the right side within the inspector named "Toggle Group". Add a name there and SceneBuilder will put the ToggleButton together with all other ToggleButtons which you give the same group name into a ToggleGroup.
You can group JavaFX ToggleButton instances into a ToggleGroup . A ToggleGroup allows at most one ToggleButton to be toggled (pressed) at any time. The ToggleButton instances in a ToggleGroup thus functions similarly to radio buttons.
You don't have to use FXML or SceneBuilder. You can simply create the objects yourself and add them to your Scene/Stage yourself. It's entirely open as to how you implement it. I've implemented a Screen Management library where it handles either FXML or manually created screens.
You can set it in the properties. It is not a visual control, but a grouping.
The ToggleGroup is not a control. When you have created a ToggleButton you can select it in SceneBuilder. Then you will find a field on the right side within the inspector named "Toggle Group". Add a name there and SceneBuilder will put the ToggleButton together with all other ToggleButtons which you give the same group name into a ToggleGroup. You can inject the toggle group into your controller in the usual way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With