Web Analytics Made Easy - Statcounter
Skip to content

Tab

Tab Element is another "Container" element that holds a layout and displays a tab with text. Used with TabGroup only Tabs are never placed directly into a layout. They are always "Contained" in a TabGroup layout

Tab(
    title,
    layout,
    title_color = None,
    background_color = None,
    font = None,
    element_justification = "left",
    pad = None,
    disabled = False,
    border_width = None,
    key = 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"
border_width int None NOT USED in tkinter port
disabled bool False If True button will be created disabled
element_justification str left All elements inside the Tab will have this justification 'left', 'right', 'center' are valid values
font (str or (str, int[, str]) or None) None NOT USED in the tkinter port
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]] The element layout that will be shown in the tab
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)
title str text to show on the tab
title_color str None color of the tab text (note not currently working on tkinter)
tooltip str None text, that will appear when mouse hovers over the element

Class Properties

This class has no public properties

Class Methods

 def update

update

Changes some of the settings for the Tab 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.

update(
    disabled = None
)

Parameter Descriptions

Name Type Default Description
disabled bool None disable or enable state of the element