Edit: This advice applies to alert()
message boxes, not to Notification
s. Scroll down for an update about Notification
s.
Yes - you can use either of two workarounds:
-
To edit the CSS of the theme (you can find it under “Assets” on the left) to set different colours for the buttons in the modal dialog, based on their Bootstrap classed (
.btn-danger
, etc. This will require some quality time with your browser’s developer tools, and an understanding of CSS.) -
Don’t use the built-in alert buttons at all, and create them in Anvil. You can pass a Form (or a panel) to the
alert()
function, and includeButton
s on that form with customisedforeground
colours. (I’d recommend putting theButton
s in aFlowPanel
withalign
set toright
, to put them in the same position as the built-in dialogs.)