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,
    element_justification = "left",
    size = (None, None),
    size_px = (None, None),
    pad = None,
    scrollable = False,
    vertical_scroll_only = False,
    right_click_menu = None,
    key = None,
    visible = True
)

Parameter Descriptions

Name Type Default Description
background_color str None color of background of entire Column. Can be in #RRGGBB format or a color name "black"
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) or 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)
right_click_menu List[List[ List[str] or str ]] None A list of lists of Menu items to show when this element is right clicked. See user docs for exact format.
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
size_px (int, int) or (None, None) (None, None) w=pixels-wide, h=pixels-high
vertical_scroll_only bool False if True then no horizontal scrollbar will be shown if a scrollable column
visible bool True set visibility state of the element

Class Properties

This class has no public properties

Class Methods

 def update

update

Changes some of the settings for the Column Element. Must call Window.Read or Window.Finalize prior

Changes will not be visible in your window until you call window.read or window.refresh.

If you change visibility, your element may MOVE. If you want it to remain stationary, use the "layout helper" function "pin" to ensure your element is "pinned" to that location in your layout so that it returns there when made visible.

update(
    visible = None
)

Parameter Descriptions

Name Type Default Description
visible bool None control visibility of element