I created a Button in designer and set the radius to 18 so that the button is round. At run time, I want to set the background color of the button to RED, so I use the following statement:
btnR1.Style = "-fx-background-color: Red;"
which works but it also resets the radius to 0 and the button shape is now rectangular.
Is there a more direct way to change the background color of a button without affecting anything else?
Thanks!
btnR1.Style = "-fx-background-color: Red;"
which works but it also resets the radius to 0 and the button shape is now rectangular.
Is there a more direct way to change the background color of a button without affecting anything else?
Thanks!