Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80187

Re: fill, expand from tkinter.pack() layout manager

Newsgroups comp.lang.python
Date 2014-11-04 06:42 -0800
References <5458dfc6$0$27505$426a74cc@news.free.fr>
Message-ID <e77adb0b-6883-4420-92aa-29c4419d910e@googlegroups.com> (permalink)
Subject Re: fill, expand from tkinter.pack() layout manager
From Fatih Güven <mfthguven@gmail.com>

Show all headers | View raw


4 Kasım 2014 Salı 16:16:52 UTC+2 tarihinde ast yazdı:
> Hi
> 
> I dont really understood how "fill" and "expand"
> works with  layout manager tkinter.pack()
> 
> Example:
> 
> from tkinter import *
> root = Tk()
> w = Label(root, text="Red", bg="red", fg="white")
> w.pack(side=LEFT, fill = BOTH)
> 
> Here is the result:
> http://cjoint.com/?0Kepj1E3Tv3
> 
> Why is the label "w" only extended vertically and not horizontally too ?
> I specified "fill = BOTH" so it should extend in both direction.
> 
> (I know that with expand = 1, it will expand in both direction) 
> 
> thx

Hi,

Packing widgets splits frame into equal areas with expand=1. if expand="false", widgets don't touch each other and widgets save their own dimension.

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

fill, expand from tkinter.pack() layout manager "ast" <nomail@invalid.com> - 2014-11-04 15:16 +0100
  Re: fill, expand from tkinter.pack() layout manager "ast" <nomail@invalid.com> - 2014-11-04 15:41 +0100
  Re: fill, expand from tkinter.pack() layout manager Fatih Güven <mfthguven@gmail.com> - 2014-11-04 06:42 -0800

csiph-web