Skip to content

[Question] 'no_titlebar' and 'Minimize()' not working together? #2559

@HatCoffee

Description

@HatCoffee

Question

Windows 10

Python 3.7.3

PySimpleGUI Version: 4.15.2

Hi. (first, sorry for poor English)
I'm working on a program and i want to use no_titlebar and window.Minimize() at the same sg window.

My test program:

`import PySimpleGUI as sg

layout = [
[sg.Text("Click the button")],
[sg.Button("Minimize"), sg.Exit()]
]

window = sg.Window("Demo", layout, no_titlebar=True, resizable=False).Finalize()

while True:
event, values = window.Read()

window.Minimize()

if event in (None, "Exit"):
    break

`

but I encounter this:

Traceback (most recent call last):
File "test.py", line 13, in
window.Minimize()
File "AppData\Local\Programs\Python\Python37\lib\site-packages\PySimpleGUI\PySimpleGUI.py", line 6211, in Minimize
self.TKroot.iconify()
File "AppData\Local\Programs\Python\Python37\lib\tkinter_init_.py", line 1875, in wm_iconify
return self.tk.call('wm', 'iconify', self._w)
_tkinter.TclError: can't iconify ".!toplevel": override-redirect flag is set

Can't I have 'no_titlebar=True' and 'window.Minimize()' together?
Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions