[Tkinter-discuss] PanedWindow proportional resizing of panes

Vasilis Vlachoudis Vasilis.Vlachoudis at cern.ch
Thu May 10 10:57:40 CEST 2012


Thank you Emiliano,

stretch did the job for the resizing of the window.

For resizing the columns I now recuperate the position with the sash_coord and sash_place.

However the only think I am missing is the to have an event handler when the sash is moved.
Is there any event that is sent when the sash is changed?

Thanks in advance
Vasilis 


________________________________________
From: Emiliano Gavilan [emilianogavilan at gmail.com]
Sent: 09 May 2012 19:03
To: Vasilis Vlachoudis
Cc: tkinter-discuss at python.org
Subject: Re: [Tkinter-discuss] PanedWindow proportional resizing of panes

2012/5/9 Vasilis Vlachoudis <Vasilis.Vlachoudis at cern.ch>:
> Hi all,
>
> in my application I am using the recipe of
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266
> to create a multilistbox. I have modified it to use the panedwindow in order
> to allow the resize of the rows, like in the code below.
> My problem(s) (all related to the resizing of the panes)
> 1. is how to make the resizing of the window to resize proportionally the
> panes (Now only the last row "Four" expands/reduce its size)

Set the stretch option to 'always'.

> 2. when the user manually resize one pane (e.g. drag between two|three, only
> the panes two and three are resized while I would prefer more a behavior
> like all other window toolkits that only "two" will be resized, "three" will
> remain the same and the last one "Four" will be reduced or expanded.
> 3. How to save/recall the size of the panes. The paneconfig(child,"width")
> returns a tuple with ('width','','','')

Use child.winfo_width() instead.

Also, note that the new ttk.Treeview() can work as a multicolumn listbox too.

Regards
Emiliano


More information about the Tkinter-discuss mailing list