grid -in frame BUG 
Author Message
 grid -in frame BUG

Please help,

I have problem using 'grid -in' command. Enclosed file produces two
identically sized widgets, but the second one remains empty. The problem
appears when using the master which is not parent of the slaves.

Platform:
SGI IRIX5.3 gcc tcl80p2
WindowsNT3.5 VC++4.0 tcl80p2

Am I doing something wrong?

proc fff { a } {
    toplevel $a
    button $a.button0 -text {Apply}
    label $a.item0 -text {Apply}
    entry $a.field0 -width 15 -bg red

    if { $a == ".menu" } {
        set ff $a
    } else {
        set ff $a.frame
        frame $ff
        pack $ff
    }

    grid $a.button0 -in $ff -column 0 -columnspan 2 -row 0 -sticky news
    grid $a.item0 -in $ff -column 0 -row 1 -sticky nws
    grid $a.field0 -in $ff -column 1 -row 1 -sticky enws

Quote:
}

fff .menu
fff .wrong

--
+------------------------------+----------------------------+---------+
|Tadeusz J. Liszka PhD.        |Computational Mechanics Co. |`.\`.    |
|(512)467-0618x526;fax:467-1382| http://www.*-*-*.com/       |  .\ `.  |
| New address:  7800 Shoal Creek #290E, Austin, TX, 78757   |  . \  `.|
+------------------------------+----------------------------+---------+
|Obligatory disclaimer:        |Obligatory cool quote:                |
| These opinions are my own,   | The public opinion should be really  |
| I sometimes agree with them, | alarmed by its own nonexistence      |
| no one else has to.          |     Stanislaw Jerzy Lec, transl. TJL |
+------------------------------+--------------------------------------+



Sat, 29 Jul 2000 03:00:00 GMT  
 grid -in frame BUG


Quote:
>Please help,

>I have problem using 'grid -in' command. Enclosed file produces two
>identically sized widgets, but the second one remains empty. The problem
>appears when using the master which is not parent of the slaves.

>Platform:
>SGI IRIX5.3 gcc tcl80p2
>WindowsNT3.5 VC++4.0 tcl80p2

>Am I doing something wrong?

yes - you'reignoring the window stacking order, which is ,by default, the
reverse of the creation order, so, either raise your newly created frame,
or reverse the order of create, as so:
proc fff { a } {
    toplevel $a

    if { $a == ".menu" } {
        set ff $a
    } else {
        set ff $a.frame
        frame $ff
        pack $ff
    }

    button $a.button0 -text {Apply}
    label $a.item0 -text {Apply}
    entry $a.field0 -width 15 -bg red

    grid $a.button0 -in $ff -column 0 -columnspan 2 -row 0 -sticky news
    grid $a.item0 -in $ff -column 0 -row 1 -sticky nws
    grid $a.field0 -in $ff -column 1 -row 1 -sticky enws

Quote:
}

fff .menu
fff .right

Ross
--

W.M. Keck Center for Computational Biology
Department of Biochemistry & Cell Biology
Rice University, 6100 S. Main St.,  Houston, TX 77005



Mon, 31 Jul 2000 03:00:00 GMT  
 grid -in frame BUG

This happens when you create the slave before creating the master frame. Try
using the "raise" command to raise the salve on top of the master.

Ioi



Tue, 01 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. frame/grid 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