This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: tkinter: initial huge window & no widgets visible
Type: behavior Stage:
Components: Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bennett78, epaine, serhiy.storchaka
Priority: normal Keywords:

Created on 2021-03-23 19:06 by bennett78, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
t4.py bennett78, 2021-03-23 19:06 simple sg window
working example.png epaine, 2021-03-24 11:30
Messages (8)
msg389403 - (view) Author: FRANK BENNETT (bennett78) Date: 2021-03-23 19:06
with any PySimpleGUI, tkinter, tk, *.py

The initial window is huge & with a size no widgets are visible

fwb@fw:/s/opt/cpython$ uname -r
5.4.0-67-generic

fwb@fw:/s/opt/cpython$ cat /etc/issue
Ubuntu 20.04.2 LTS \n \l

fwb@fw:/s/opt/cpython$ ./python -V
Python 3.10.0a6+fwb@fw:/s/opt/cpython$ cat .git/config 
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = https://github.com/bennett78/cpython.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master


What sets initial window configuration ?
msg389409 - (view) Author: E. Paine (epaine) * Date: 2021-03-23 20:37
I have removed the Windows component as the issue reported seems to be on Ubuntu (but I don't like removing others from the nosy, so have left that alone).

Tkinter does no initial window configuration created through either `Tk()` or `Toplevel()` as this is all handled by Tk (though I don't believe that would do the behaviour you describe). I cannot reproduce the issue (either with or without the 'size' argument) but suggest you take it up with the PySimpleGui team as they may be doing some custom configuration.
msg389425 - (view) Author: FRANK BENNETT (bennett78) Date: 2021-03-24 01:40
How about the following - title ok but no label visible ?

# t8.py
import tkinter as tk

class Application(tk.Tk):
    def __init__(self):
        tk.Tk.__init__(self)
        self.geometry('500x500')
        self.title('Your first App')

        first_label = tk.Label(self, text = "I'm a cool App!!", font=10, bg="black",fg="red" )
        first_label.pack(pady= 2, padx = 2)

app = Application()
app.mainloop()
msg389443 - (view) Author: E. Paine (epaine) * Date: 2021-03-24 11:30
That example also works on my setup (see attached). The only reason I could think that your label is not showing is that the font given is not of a valid format (see https://www.tcl.tk/man/tcl8.6/TkCmd/font.htm#M13), though I would have thought this would raise a TclError.

Please confirm what platform and Python version you are using as well as the output of `tkinter.test.support.get_tk_patchlevel()`.
msg389444 - (view) Author: E. Paine (epaine) * Date: 2021-03-24 11:36
Apologies, you did give the platform and Python version. I presume you are compiling the master branch, in which case do you have the 'tk8.6-dev' package installed?
msg389451 - (view) Author: FRANK BENNETT (bennett78) Date: 2021-03-24 13:40
fwb@fw:/s/opt/cpython/debug$ ./python -V
Python 3.10.0a6+
msg389471 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-03-24 15:37
PySimpleGUI is not a part of the stdlib.

If you have problems with pure Tkinter, look if you have files .Xdefaults or .Xresources in your home directory. They can alter default look of Tk widgets. Try to remove them and test whether the problem is gone.

If the problem is still here, perhaps you have some fonts misconfiguration.
msg389484 - (view) Author: FRANK BENNETT (bennett78) Date: 2021-03-24 19:23
Roundup requires submission inplain text...forget how to turn this off in thunderbird...sounds like a left over from microsoft emailers...how do I see/respond to comments with an issue ?

On 3/24/21 9:37 AM, Serhiy Storchaka wrote:
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
>
> PySimpleGUI is not a part of the stdlib.
>
> If you have problems with pure Tkinter, look if you have files .Xdefaults or .Xresources in your home directory. They can alter default look of Tk widgets. Try to remove them and test whether the problem is gone.
>
> If the problem is still here, perhaps you have some fonts misconfiguration.
Good suggestion but same results...
  Tkinter ? Python 3.10 wants tkinter
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue43606>
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87772
2021-03-26 20:08:22terry.reedysetnosy: - paul.moore, tim.golden, zach.ware, steve.dower

title: PySimpleGUI: initial huge window & no widgets visible -> tkinter: initial huge window & no widgets visible
2021-03-24 19:23:14bennett78setmessages: + msg389484
components: - Tkinter
2021-03-24 15:37:44serhiy.storchakasetmessages: + msg389471
2021-03-24 13:40:45bennett78setmessages: + msg389451
2021-03-24 11:36:43epainesetmessages: + msg389444
2021-03-24 11:30:31epainesetfiles: + working example.png

messages: + msg389443
2021-03-24 01:40:24bennett78setmessages: + msg389425
2021-03-23 20:38:18epainesetnosy: - pau
2021-03-23 20:37:55epainesettitle: initial huge window && no widgets visible -> PySimpleGUI: initial huge window & no widgets visible
nosy: + pau, serhiy.storchaka, epaine

messages: + msg389409

components: - Windows
2021-03-23 19:06:15bennett78create