MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / Column

Class Column

PySimpleGUI/PySimpleGUI.py:8170–8420  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

8168# Column #
8169# ---------------------------------------------------------------------- #
8170class Column(Element):
8171 """
8172 A container element that is used to create a layout within your window's layout
8173 """
8174
8175 def __init__(self, layout, background_color=None, size=(None, None), s=(None, None), size_subsample_width=1, size_subsample_height=2, pad=None, p=None, scrollable=False,
8176 vertical_scroll_only=False, horizontal_scroll_only=False, right_click_menu=None, key=None, k=None, visible=True, justification=None, element_justification=None,
8177 vertical_alignment=None, grab=None, expand_x=None, expand_y=None, metadata=None,
8178 sbar_trough_color=None, sbar_background_color=None, sbar_arrow_color=None, sbar_width=None, sbar_arrow_width=None,
8179 sbar_frame_color=None, sbar_relief=None):
8180 """
8181 :param layout: Layout that will be shown in the Column container
8182 :type layout: List[List[Element]]
8183 :param background_color: color of background of entire Column
8184 :type background_color: (str)
8185 :param size: (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
8186 :type size: (int | None, int | None)
8187 :param s: Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used
8188 :type s: (int | None, int | None)
8189 :param size_subsample_width: Determines the size of a scrollable column width based on 1/size_subsample * required size. 1 = match the contents exactly, 2 = 1/2 contents size, 3 = 1/3. Can be a fraction to make larger than required.
8190 :type size_subsample_width: (float)
8191 :param size_subsample_height: Determines the size of a scrollable height based on 1/size_subsample * required size. 1 = match the contents exactly, 2 = 1/2 contents size, 3 = 1/3. Can be a fraction to make larger than required..
8192 :type size_subsample_height: (float)
8193 :param pad: 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)
8194 :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
8195 :param p: Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used
8196 :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
8197 :param scrollable: 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
8198 :type scrollable: (bool)
8199 :param vertical_scroll_only: if True then no horizontal scrollbar will be shown if a scrollable column
8200 :type vertical_scroll_only: (bool)
8201 :param horizontal_scroll_only: if True then no verticale scrollbar will be shown if a scrollable column
8202 :type horizontal_scroll_only: (bool)
8203 :param right_click_menu: A list of lists of Menu items to show when this element is right clicked. See user docs for exact format.
8204 :type right_click_menu: List[List[ List[str] | str ]]
8205 :param key: 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
8206 :type key: str | int | tuple | object
8207 :param k: Same as the Key. You can use either k or key. Which ever is set will be used.
8208 :type k: str | int | tuple | object
8209 :param visible: set visibility state of the element
8210 :type visible: (bool)
8211 :param justification: set justification for the Column itself. Note entire row containing the Column will be affected
8212 :type justification: (str)
8213 :param element_justification: All elements inside the Column will have this justification 'left', 'right', 'center' are valid values
8214 :type element_justification: (str)
8215 :param vertical_alignment: Place the column at the 'top', 'center', 'bottom' of the row (can also use t,c,r). Defaults to no setting (tkinter decides)
8216 :type vertical_alignment: (str)
8217 :param grab: If True can grab this element and move the window around. Default is False
8218 :type grab: (bool)
8219 :param expand_x: If True the column will automatically expand in the X direction to fill available space
8220 :type expand_x: (bool)
8221 :param expand_y: If True the column will automatically expand in the Y direction to fill available space
8222 :type expand_y: (bool)
8223 :param metadata: User metadata that can be set to ANYTHING
8224 :type metadata: (Any)
8225 :param sbar_trough_color: Scrollbar color of the trough
8226 :type sbar_trough_color: (str)
8227 :param sbar_background_color: Scrollbar color of the background of the arrow buttons at the ends AND the color of the "thumb" (the thing you grab and slide). Switches to arrow color when mouse is over

Callers 14

extend_layoutMethod · 0.85
pinFunction · 0.85
vtopFunction · 0.85
vcenterFunction · 0.85
vbottomFunction · 0.85
TitlebarFunction · 0.85
MenubarCustomFunction · 0.85
BuildWindowMethod · 0.85
theme_previewerFunction · 0.85
main_sdk_helpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected