-
Bug
-
Resolution: Fixed
-
P3
-
fx2.0.2, 8
The ContextMenu created automaticly during adding MenuItem's to Menu is outside DOM structure, so there is no option to have more then one custom skin for ContextMenu, and there is no way to get programatically object representing ContectMenu (submenu of menu), and to set StyleClass or Id. I don't know if it is really a bug, or it supposed to work like that, but I don't think so.
Example:
//.java
Menu menu1 = new Menu("File");
menu1.setId("menu1");
menu1.getItems().addAll(new MenuItem("Open"), new MenuItem("Close"), ...);
//.css
//Problem: No access to ContextMenu
#menu1 .context-menu {}
// only this works
.context-menu {}
Example:
//.java
Menu menu1 = new Menu("File");
menu1.setId("menu1");
menu1.getItems().addAll(new MenuItem("Open"), new MenuItem("Close"), ...);
//.css
//Problem: No access to ContextMenu
#menu1 .context-menu {}
// only this works
.context-menu {}
- relates to
-
JDK-8116444 BUG ChoiceBox Java 8 b75
- Resolved
-
JDK-8127305 PopupControl not styled by Parent's stylesheet rules nor inlined inherited declarations
- Closed
-
JDK-8124275 Cannot set background on Popup
- Closed