[Tkinter-discuss] Fixed ratio split screen geometry manager
Michael Lange
klappnase at web.de
Tue Mar 6 19:30:50 EST 2018
Hi,
On Tue, 6 Mar 2018 09:57:01 -0800
Nam Nguyen <namnguyen at verily.com> wrote:
> Hi,
>
> I'm looking for a fixed ratio 2-pane geometry manager.
>
> I tried PanedWindow but it does not have any option for me to specify
> the ratio of the children.
>
> What I'm looking for is a geometry manager/container that splits its
> space into two for the children. The children can grow only in their
> own spaces. The children can come and go, but the parent container
> should maintain that 2-pane split with the same ratio.
>
> Where should I look into?
in case you do not need the PanedWindow's resize handle, you might
want to have a look at the Grid geometry manager's uniform and weight
options to the grid_columnconfigure() and grid_rowconfigure() commands.
Another option might be to have a look at the Place geometry manager,
especially the relheight and relwidth options. Using for example
relheight=0.5 will make the widget always occupy 50% of the parent
widget's height.
Best regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
The sight of death frightens them [Earthers].
-- Kras the Klingon, "Friday's Child", stardate 3497.2
More information about the Tkinter-discuss
mailing list