Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Column

A vertical layout container inside a Row. Column is an alias of Container, so it takes every Container argument plus weight.

with sc.Row():
    with sc.Column(weight=5):
        sc.Text('Main pane')
    with sc.Column(weight=2):
        sc.Text('Side pane')
ArgumentTypeMeaning
weightfloatFlex-grow ratio inside a Row
width, height, …size keywordsThe column’s own size
borderboolDraw a border
border_titlestr | PropertyTitle in the border
animatedboolAnimate height when visible flips

Properties: border_title, visible.

Weights

weight decides how the leftover width is shared. A (5, 2) split is two columns with weight=5 and weight=2. Without weights, columns share the width equally.

with sc.Row():
    sc.Column(weight=3)
    sc.Column(weight=1)

A column is a full Container; see Container for borders, fixed heights, and scrolling.