mirror of
https://github.com/navidys/tvxwidgets.git
synced 2025-04-30 13:48:57 +08:00
22 lines
499 B
Go
22 lines
499 B
Go
// Demo code for the bar chart primitive.
|
|
package main
|
|
|
|
import (
|
|
"github.com/navidys/tvxwidgets"
|
|
"github.com/rivo/tview"
|
|
)
|
|
|
|
func main() {
|
|
app := tview.NewApplication()
|
|
dialog := tvxwidgets.NewMessageDialog(tvxwidgets.ErrorDailog)
|
|
dialog.SetTitle("error dialog")
|
|
dialog.SetMessage("This is first line of error\nThis is second line of the error message")
|
|
dialog.SetDoneFunc(func() {
|
|
app.Stop()
|
|
})
|
|
|
|
if err := app.SetRoot(dialog, true).EnableMouse(true).Run(); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|