[SOLVED] Notification Colors in New Material Design

Edit: This advice applies to alert() message boxes, not to Notifications. Scroll down for an update about Notifications.

Yes - you can use either of two workarounds:

  1. 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.)

  2. 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 include Buttons on that form with customised foreground colours. (I’d recommend putting the Buttons in a FlowPanel with align set to right, to put them in the same position as the built-in dialogs.)

1 Like