Fixed Layout API

class threepanewindows.fixed.FixedThreePaneLayout(master, side_width=150, sash_width=2, left_width=None, right_width=None, left_fixed_width=None, right_fixed_width=None, min_pane_size=50, menu_bar=None, **kwargs)[source]

Bases: Frame

A fixed three-pane window layout with left, center, and right panes.

This class provides a simple three-pane layout where the side panes can have fixed or resizable widths, and the center pane fills the remaining space. It supports menu bars and customizable pane sizing.

Parameters:
  • master (tk.Widget) – The parent widget.

  • side_width (int) – Default width for side panes (default: 150).

  • sash_width (int) – Width of the sash/separator between panes (default: 2).

  • left_width (Optional[int]) – Specific width for left pane (overrides side_width).

  • right_width (Optional[int]) – Specific width for right pane (overrides side_width).

  • left_fixed_width (Optional[int]) – Fixed width for left pane (non-resizable).

  • right_fixed_width (Optional[int]) – Fixed width for right pane (non-resizable).

  • min_pane_size (int) – Minimum size for resizable panes (default: 50).

  • menu_bar (Optional[tk.Menu]) – Menu bar to attach to the parent window.

  • **kwargs – Additional keyword arguments passed to tk.Frame.

Construct a frame widget with the parent MASTER.

Valid resource names: background, bd, bg, borderwidth, class, colormap, container, cursor, height, highlightbackground, highlightcolor, highlightthickness, relief, takefocus, visual, width.

add_to_center(widget)[source]
Parameters:

widget (Widget)

Return type:

None

add_to_left(widget)[source]
Parameters:

widget (Widget)

Return type:

None

add_to_right(widget)[source]
Parameters:

widget (Widget)

Return type:

None

property center_pane: Frame

Access to center pane for adding widgets.

clear_center()[source]

Clear all widgets from the center pane except the default label.

Return type:

None

clear_left()[source]

Clear all widgets from the left pane except the default label.

Return type:

None

clear_right()[source]

Clear all widgets from the right pane except the default label.

Return type:

None

property frame_center: Frame

Get the center frame container (legacy property name).

property frame_left: Frame

Get the left frame container (legacy property name).

property frame_right: Frame

Get the right frame container (legacy property name).

get_left_width()[source]

Get the current left pane width.

Return type:

int

get_right_width()[source]

Get the current right pane width.

Return type:

int

is_left_fixed()[source]

Check if left pane has fixed width.

Return type:

bool

is_right_fixed()[source]

Check if right pane has fixed width.

Return type:

bool

property left_pane: Frame

Access to left pane for adding widgets.

property right_pane: Frame

Access to right pane for adding widgets.

set_label_texts(left=None, center=None, right=None)[source]
Parameters:
  • left (str | None)

  • center (str | None)

  • right (str | None)

Return type:

None

set_left_width(width)[source]

Set the left pane width.

Parameters:

width (int)

Return type:

None

set_right_width(width)[source]

Set the right pane width.

Parameters:

width (int)

Return type:

None

threepanewindows.fixed.FixedThreePaneWindow

alias of FixedThreePaneLayout

FixedThreePaneWindow

threepanewindows.FixedThreePaneWindow

alias of FixedThreePaneLayout