-
How to let the app to minimize, and stay in the system tray? It seem no this API. |
Beta Was this translation helpful? Give feedback.
Answered by
Jacalz
Sep 3, 2022
Replies: 2 comments 6 replies
-
You can set up a close intercept on the main window to make sure that the application is hidden instead of closed when pressing the close button. Like this: a := app.New()
w := a.NewWindow("Window Name")
if _, ok := a.(desktop.App); ok {
w.SetCloseIntercept(w.Hide) // don't close the window if system tray is used
} You of course also need to create the system tray within that if-statement but I assume that you have that code already. |
Beta Was this translation helpful? Give feedback.
4 replies
-
This might be a duplicate of #3156 come to think of it. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
fayfive
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This might be a duplicate of #3156 come to think of it.