DIALOG
A simple message dialog package.
Usage:
This package needs GoTK3 (GTK) to run (see link below), and you will need to run gtk.Init() somewhere in your application, before using the dialogs.
gtk.Init(&os.Args)
dialog.Title("Hello World!").OkButton().Show()
dialog.Title("Hello World!").Text("How are you today?").OkButton().Show()
response := dialog.Title("Hello World!").
Text("How are you today?").
Extra(getLongText()).
QuestionIcon().
YesNoButtons().
Height(400).
Show()
if response == gtk.RESPONSE_YES {
dialog.Title("Your response...").
Text("...was affirmative!").
WarningIcon().
OkButton().
Width(400).
Show()
} else {
dialog.Title("Your response...").
Text("...was very negative!").
ErrorIcon().
OkButton().
Width(400).
Show()
}
LINKS
TODO
- Choose between smaller and larger icons