[Python-bugs-list] Tkinter geometry problem with grid (PR#237)

komarek@andrew.cmu.edu komarek@andrew.cmu.edu
Thu, 16 Mar 2000 00:00:03 -0500 (EST)


Full_Name: Paul Komarek
Version: 1.5.2
OS: RedHat GNU/Linux 6.1
Submission from: elmo.rem.cmu.edu (128.2.82.218)



This seems to be the right place to submit a (possible) Tkinter bug, but
please let me know if it isn't.  I'm running Python 1.5.2, with Tkinter from
the RedHat rpm tkinter-1.5.2-7.  Here's the shortest code I could make that
illustrated the problem:

from Tkinter import *
root = Tk()
f = Frame( root).pack()
Label( f, text = 'Hello1').grid()
root.mainloop()

The Tk window never shows up, I assume because of a geometry negotiation
failure.  I believe this should work because the Label is gridded inside f,
and is the only widget inside f.  f is packed in the root, and is the only
widget.  So there should be no conflicts, correct?

I ran the following code in Perl/Tk:

use strict;
use Tk;
my $root = MainWindow->new;
my $f = $root->Frame()->pack();
$f->Label( -text => "Hello1")->grid();
MainLoop;

I believe this should be equivalent to the Python code above.  However, the
result is what I expected--a window with a label in it, no problems with
geometry, etc.

-Paul Komarek