frame/grid bug? 
Author Message
 frame/grid bug?

This program hangs, running the CPU at 100% until it is killed:

frame .a
pack .a
label .b -text aaa
grid .b -row 2 -column 2

This happens with both wish4.2 and wish8.0.  Anybody seen this before?

Thanks,
Mark.



Mon, 08 Nov 1999 03:00:00 GMT  
 frame/grid bug?

Hi,

Quote:


> >This program hangs, running the CPU at 100% until it is killed:

> >frame .a
> >pack .a
> >label .b -text aaa
> >grid .b -row 2 -column 2

> >This happens with both wish4.2 and wish8.0.  Anybody seen this before?

> The master widget, in this case ., is being managed by two geometry managers.
> The two managers, the packer and the gridder, will compete with each other
> over the arrangement of the slaves.  Any changes made to one slave or the master
> will cause the other slave to have its geometry re-calculated, which will then
> propagate up to the master which will then propagate it back down to the other
> slave, etc, etc.

> This is a script programming error, rather than a Tk bug.

> The fact that Tk allows different geometry managers in a master widget is a
> "mis-feature" that perhaps should be corrected.

IMHO, having several geometry managers for one window can be useful in
certain cases (I used that in a megawidget I made some time ago). But
as you said, this can lead to a conflict due to geometry propagation. To
avoid that, just do "pack propagate . 0" whenever you want to use
several geometry managers at a time on ".".

See you, Fred
--

 Ingenieur Ecole des Mines de Nantes/Ecole des Mines de Nantes Engineer
        IRISA Rennes, France - Projet Solidor/Solidor Project
------------------------------------------------------------------------
  Tcl: can't leave     | "Theory may inform but Practice convinces."
$env(HOME) without it! |                                     George BAIN



Tue, 09 Nov 1999 03:00:00 GMT  
 frame/grid bug?


Quote:
>This program hangs, running the CPU at 100% until it is killed:

>frame .a
>pack .a
>label .b -text aaa
>grid .b -row 2 -column 2

>This happens with both wish4.2 and wish8.0.  Anybody seen this before?

The master widget, in this case ., is being managed by two geometry managers.
The two managers, the packer and the gridder, will compete with each other
over the arrangement of the slaves.  Any changes made to one slave or the master
will cause the other slave to have its geometry re-calculated, which will then
propagate up to the master which will then propagate it back down to the other
slave, etc, etc.

This is a script programming error, rather than a Tk bug.

The fact that Tk allows different geometry managers in a master widget is a
"mis-feature" that perhaps should be corrected.

Steve Ball
--

Ph. +61 6 2495146                               http://www.*-*-*.com/
Snail-mail: Canberra ACT 0200, AUSTRALIA
           He's not the messiah, he's a very {*filter*} boy!



Tue, 09 Nov 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. grid -in frame BUG

2. frames and grids ...

3. grid a frame blocks GUI

4. Sizing of grid in a frame (ARGGHHH!!!!)

5. Grid options -ipadx and -ipady not working for frames

6. One grid in Different frames

7. aligning grid on top of frame

8. tk/tkinter radiobutton in grid bug?

9. Need workaround for bug/quirk in [grid]

10. Grid behaves wrong, bug?

11. tk/tkinter radiobutton in grid bug?

12. Bug: Tk 8.0 infinite loop in pack/grid combo

 

 
Powered by phpBB® Forum Software