bootstack.alert#

bootstack.alert(message, *, title='', ok_text='OK', severity=None, icon=None, sound=None, parent=None)#

Show a message dialog with an OK button.

Parameters:
  • message (str) – The message text to display.

  • title (str) – Dialog window title.

  • ok_text (str) – Label for the OK button. Defaults to 'OK'.

  • severity (SeverityToken | None) – Visual severity level — sets a colored icon and controls the default sound behavior. 'warning' and 'danger' ring the system bell by default; 'info' and 'success' are silent.

  • icon (str | None) – Icon name override. Takes precedence over severity.

  • sound (bool | None) – Override the alert sound. True always rings the bell, False always suppresses it. None (default) defers to severity: rings for 'warning' and 'danger', silent otherwise.

  • parent (Any) – Parent widget. Defaults to the active root window.