wijjit.layout.frames.FrameStyle

class wijjit.layout.frames.FrameStyle(border_style=BorderStyle.SINGLE, title=None, padding=(0, 1, 0, 1), content_align_h='stretch', content_align_v='stretch', scrollable=True, show_scrollbar=True, show_scrollbar_x=True, overflow_y='auto', overflow_x='clip')[source]

Style configuration for a frame.

Parameters:
  • border_style (BorderStyle) – Border style to use

  • title (str, optional) – Frame title

  • padding (tuple, optional) – Padding (top, right, bottom, left)

  • content_align_h ({"left", "center", "right", "stretch"}, optional) – Horizontal alignment of content within frame (default: “stretch”)

  • content_align_v ({"top", "middle", "bottom", "stretch"}, optional) – Vertical alignment of content within frame (default: “stretch”)

  • scrollable (bool, optional) – Enable scrolling for content that exceeds frame height (default: True)

  • show_scrollbar (bool, optional) – Show vertical scrollbar when scrollable (default: True)

  • show_scrollbar_x (bool, optional) – Show horizontal scrollbar when horizontal scrolling enabled (default: True)

  • overflow_y ({"clip", "scroll", "auto"}, optional) – Vertical overflow behavior (default: “auto”) - “clip”: Clip content beyond viewport - “scroll”: Always show scrollbar - “auto”: Show scrollbar only when needed

  • overflow_x ({"clip", "visible", "wrap", "scroll", "auto"}, optional) – Horizontal overflow behavior (default: “clip”) - “clip”: Truncate text at frame width (default behavior) - “visible”: Allow text to extend beyond frame borders - “wrap”: Wrap text to multiple lines at word boundaries - “scroll”: Enable horizontal scrolling with scrollbar - “auto”: Enable horizontal scrolling only when content exceeds width

__init__(border_style=BorderStyle.SINGLE, title=None, padding=(0, 1, 0, 1), content_align_h='stretch', content_align_v='stretch', scrollable=True, show_scrollbar=True, show_scrollbar_x=True, overflow_y='auto', overflow_x='clip')
Parameters:
  • border_style (BorderStyle)

  • title (str | None)

  • padding (tuple[int, int, int, int])

  • content_align_h (Literal['left', 'center', 'right', 'stretch'])

  • content_align_v (Literal['top', 'middle', 'bottom', 'stretch'])

  • scrollable (bool)

  • show_scrollbar (bool)

  • show_scrollbar_x (bool)

  • overflow_y (Literal['clip', 'scroll', 'auto'])

  • overflow_x (Literal['clip', 'visible', 'wrap', 'scroll', 'auto'])

Return type:

None

Methods

__init__([border_style, title, padding, ...])

Attributes

border_style

content_align_h

content_align_v

overflow_x

overflow_y

padding

scrollable

show_scrollbar

show_scrollbar_x

title

border_style: BorderStyle = 'single'
title: str | None = None
padding: tuple[int, int, int, int] = (0, 1, 0, 1)
content_align_h: Literal['left', 'center', 'right', 'stretch'] = 'stretch'
content_align_v: Literal['top', 'middle', 'bottom', 'stretch'] = 'stretch'
scrollable: bool = True
show_scrollbar: bool = True
show_scrollbar_x: bool = True
overflow_y: Literal['clip', 'scroll', 'auto'] = 'auto'
overflow_x: Literal['clip', 'visible', 'wrap', 'scroll', 'auto'] = 'clip'