B4J Question MenuBar Background

Guenter Becker

Active Member
Licensed User
Hello,
Sorry I'm no CSS programmer. Need to give the Menubar Bar Background a shaded Color. Tried some CSS from the Web but they don't work.
Anyone helping me with a snipped. Thankyou.
 

PaulMeuris

Well-Known Member
Licensed User
You could do a google search with the words: javafx css gradient
The AI overview gives you all the possible css settings.
1759723836040.png

Changes in your MyMenu.css file:
CSS:
{
    -fx-my-menu-color: linear-gradient(from 0% 0% to 100% 100%, #ff0000, #0000ff);    /*#0134fa;*/
}

.menu-bar {
    -fx-background-color: -fx-my-menu-color;
}
In your Main module you can comment the line:
B4X:
'    b4x.SetColorAndBorder(xui.color_blue,2dip,xui.Color_Black,5dip)
 
Upvote 0
Top