Reputation: 4691
I'm having a hard time finding an example of a CustomMenuItem in FXML. Based on the API docs, I was trying this:
<SplitMenuButton fx:id="dwnldBtn" text="Download"
maxWidth="10000" maxHeight="10000" prefHeight="10000"
GridPane.columnIndex="0" GridPane.rowIndex="3" onAction="#handleDownloadBtn">
<items>
<CustomMenuItem >
<button text="Download All" onAction="#handleDownloadAllBtn"/>
</CustomMenuItem>
</items>
</SplitMenuButton>
But it seems this is syntactically wrong. I want to use a button within a CustomMenuItem, because (unlike a regular MenuItem) a button can be resized (MenuItem lacks properties like maxWidth).
Upvotes: 1
Views: 331