Search code examples
gouser-interfacefyne

Golang, fyne: How can I remove default minimize, maximize and close buttons?


I want to create a gui app on golang with fyne and can't remove this top border with maximize, minimize, close buttons. I just want a simple square to create a modern gui. Hope exist a solution for this, thanks for help


Solution

  • The driver will make what is a standard OS window to give the best user experience. On desktop this is with the standard buttons, on mobile without.

    To remove border on desktop you can use the splash window feature. But the user will not be able to move/resize/close this window.

    drv := fyne.CurrentApp().Driver()
    if drv, ok := drv.(desktop.Driver); ok {
        w := drv.CreateSplashWindow()
    }