Skip to content

Dialogs

The dialog package has ready-made dialogs for the common cases: telling the user something, asking them to confirm, collecting a few values, and choosing a file, a folder or a colour. Every dialog is shown over a parent window that you pass in.

Most dialogs come in two forms:

  • ShowXxx(…) builds the dialog and shows it at once.
  • NewXxx(…) builds it and returns it, so you can change it before you call Show().

Dialogs do not block. Show returns straight away, and the result arrives later in the callback you passed. Write the code that depends on the answer inside that callback.