Web Analytics Made Easy - Statcounter
Skip to content

Column

A container element that is used to create a layout within your window's layout

Column(
    layout,
    background_color = None,
    size = (None, None),
    pad = None,
    scrollable = False,
    vertical_scroll_only = False,
    element_justification = "left",
    key = None
)

Parameter Descriptions

Name Type Default Description
background_color str None color of background of entire Column
element_justification str left All elements inside the Column will have this justification 'left', 'right', 'center' are valid values
key str or int or tuple or object None Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window
layout List[List[Element]] Layout that will be shown in the Column container
pad (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) None Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int)
scrollable bool False if True then scrollbars will be added to the column. If you update the contents of a scrollable column, be sure and call Column.contents_changed also
size (int or None, int or None) (None, None) (width, height) size in pixels (doesn't work quite right, sometimes only 1 dimension is set by tkinter. Use a Sizer Element to help set sizes
vertical_scroll_only bool False if True then no horizontal scrollbar will be shown if a scrollable column

Class Properties

This class has no public properties

Class Methods

 def layout
 def update

layout

Can use like the Window.Layout method, but it's better to use the layout parameter when creating

layout(
    rows
)

Parameter Descriptions

Name Type Default Description
rows List[List[Element]] The rows of Elements

update

Updates the element

update(
    widget,
    background_color = None,
    text_color = None,
    font = None,
    visible = None,
    disabled = None,
    tooltip = None
)

Parameter Descriptions

Name Type Default Description
background_color str None color of background. Can be in #RRGGBB format or a color name "black"
disabled bool None Is the element disabled
font (str or (str, int[, str]) or None) None specifies the font family, size. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
text_color None Text color
tooltip None Tooltip to be shown
visible bool None Is the element visible
widget The widget to be updated