ThRuST Well-Known Member Licensed User Longtime User Nov 15, 2016 #1 What's the CSS command to make Menubar menuitems container edges rounded? I've been looking everywhere without finding the solution. It might looks nicer with rounded submenu items instead of rectangle shape. Thanks
What's the CSS command to make Menubar menuitems container edges rounded? I've been looking everywhere without finding the solution. It might looks nicer with rounded submenu items instead of rectangle shape. Thanks
jmon Well-Known Member Licensed User Longtime User Nov 16, 2016 #2 I think the only way to do it is with an external css file, see the example attached B4X: .menu-item .label { -fx-text-fill: grey; -fx-background-radius:15; } .menu-item:focused { -fx-background-color: red; } .menu-item:focused .label { -fx-text-fill: blue; } .context-menu { -fx-skin: "com.sun.javafx.scene.control.skin.ContextMenuSkin"; -fx-background-color: black; -fx-background-insets: 0, 1, 2; -fx-background-radius: 0 6 6 6, 0 5 5 5, 0 4 4 4; -fx-padding: 0.333333em 0.083333em 0.666667em 0.083333em; /* 4 1 8 1 */ } Attachments menuBarCss.zip 1.3 KB · Views: 295 Upvote 0
I think the only way to do it is with an external css file, see the example attached B4X: .menu-item .label { -fx-text-fill: grey; -fx-background-radius:15; } .menu-item:focused { -fx-background-color: red; } .menu-item:focused .label { -fx-text-fill: blue; } .context-menu { -fx-skin: "com.sun.javafx.scene.control.skin.ContextMenuSkin"; -fx-background-color: black; -fx-background-insets: 0, 1, 2; -fx-background-radius: 0 6 6 6, 0 5 5 5, 0 4 4 4; -fx-padding: 0.333333em 0.083333em 0.666667em 0.083333em; /* 4 1 8 1 */ }
Cableguy Expert Licensed User Longtime User Nov 16, 2016 #3 Check out this thread https://www.b4x.com/android/forum/threads/css-style-reference-guide.58264/ Upvote 0