Hello
I am trying to change the background color for the context menu.
I have tried:
contextMenu: $(
'ContextMenu',
{ background: 'white' }, // Adding background doesn't effect the menu
$(
'ContextMenuButton',
{
background: 'white', // Adding background doesn't effect the context menu button
},
$(go.TextBlock, { stroke: '#497A98', margin: 5, font: '500 15px Roboto, sans-serif' }, 'Do Something')
),
)
The only solution I came up with was to add a go.Panel
that wraps every go.TextBlock
but that seems like a lot of code for such a simple change.
Surely there must be a simpler way to set the background color for the context menu?
Also, I know of the option to use html menus but that also seems like a complex option for such a simple change.
EDIT:
After accidently bumping into a post dealing with another issue of the context menu I came upon this line:
'ButtonBorder.fill': 'white',
This solved the issue for me.
But, I have to say that with proper documentation a lot of time would have been saved.
I am sure I am not the only person looking for a simple solution to customizing the context menu items without resorting to an html solution.