in reply to tk frame packing showing inconsistent behaviour

G'day ghosh123,

I recommend that you read the Tk::pack documentation, paying particular attention to the "THE PACKER ALGORITHM" and "EXPANSION" sections.

You specify that $hlistframe should take up the available vertical space with "-side => 'top', -expand => 1", then seem surprised that it does so: claiming it's "showing inconsistent behaviour".

After you've used up the available space, you add $bottomframe (curiously, given the variable name, as "-side => 'top'") which, obviously, is out of sight until you enlarge the window. You also use "-fill => 'both'" for this frame which, in the context of the code you've posted, makes no sense.

-- Ken

Replies are listed 'Best First'.
Re^2: tk frame packing showing inconsistent behaviour
by ghosh123 (Monk) on Aug 23, 2013 at 18:31 UTC

    As per the doc , if i use -side => top, then the width of the parcel is the width of the cavity and its height is the requested height of the slave plus the -ipady and -pady options.
    So I set a smaller height for the $hlistframe so that it does not use up the available vertical space and some space is still left for the $bottomframe. Also packed the $bottomframe with -side=>bottom. But it is not working.
    May be I am doing something wrong. Plese help.
    Thanks.

      Try reading the algorithm again, paying close attention to the options in -bold

      packorder is packorder it determines who gets dibs first, and you have $bottomframe last in the packorder

      The solution is to change the packorder