• Repacking changes widget position

    From Luc@21:1/5 to All on Thu Nov 3 04:06:32 2022
    I have this window with frames, three stacked frames. I want to be able
    to toggle the upper one

    if {[winfo ismapped $::topframe]} {
    pack forget $::topframe
    } else {pack $::topframe -fill both -expand 0}

    It works except that the top frame comes back at the bottom.

    Is there a smart way to repack it at the top, short of destroying the
    parent window and repacking everything again?


    --
    Luc


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luc@21:1/5 to Luc on Thu Nov 3 07:20:47 2022
    Never mind, I found out by myself. The -before option.

    Thank you anyway. I'm sure you would have helped
    if you had had the chance. :-)


    --
    Luc


    **************************
    On Thu, 3 Nov 2022 04:06:32 -0300, Luc wrote:

    I have this window with frames, three stacked frames. I want to be able
    to toggle the upper one

    if {[winfo ismapped $::topframe]} {
    pack forget $::topframe
    } else {pack $::topframe -fill both -expand 0}

    It works except that the top frame comes back at the bottom.

    Is there a smart way to repack it at the top, short of destroying the
    parent window and repacking everything again?

    ************************

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)