mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[v3] Add window Enabled method. Fix dialog attachment
This commit is contained in:
@@ -294,6 +294,13 @@ func main() {
|
||||
app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show()
|
||||
})
|
||||
})
|
||||
stateMenu.Add("Disable for 5s").OnClick(func(ctx *application.Context) {
|
||||
currentWindow(func(w *application.WebviewWindow) {
|
||||
w.SetEnabled(false)
|
||||
time.Sleep(5 * time.Second)
|
||||
w.SetEnabled(true)
|
||||
})
|
||||
})
|
||||
|
||||
printMenu := menu.AddSubmenu("Print")
|
||||
printMenu.Add("Print").OnClick(func(ctx *application.Context) {
|
||||
|
||||
Reference in New Issue
Block a user