PySimpleGUI/readme_creator/markdown input files/5_call_reference.md

38 KiB

pysimplegui_logo

ELEMENT AND FUNCTION CALL REFERENCE

Here you will find the details for all Elements, Objects, and Functions that are available to you. If you want to use a complex element and don't understand the parameters, then this is the right place to come. For every element you're shown the parameters used to create it as well as all methods available to call.

Currently PySimpleGUI (tkinter) only

This documentation is created using the PySimpleGUI.py file which means it's based on the tkinter code. Some of the calls are different, might not exist at all, or there may be more methods/functions for the other PySimpleGUI ports (Qt, Wx, Web).

Work is underway to get the PySimpleGUIQt docstrings completed and corrected.

Caution - Some functions / methods may be internal only yet exposed in this documentation

This section of the documentation is generated directly from the source code. As a result, sometimes internal only functions or methods that you are not supposed to be calling are accidently shown in this documentation. Hopefully these accidents don't happen often.

Here are all of the Elements, the Window & SystemTray classes, and all functions

Button Element

Click

GetText

SetFocus

SetTooltip

Update

bind

click

expand

get_size

get_text

hide_row

set_cursor

set_focus

set_size

set_tooltip

set_vscroll_position

unbind

unhide_row

update

ButtonMenu Element

Click

SetFocus

SetTooltip

Update

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

set_vscroll_position

unhide_row

update

Canvas Element

SetFocus

SetTooltip

TKCanvas

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

tk_canvas

unbind

unhide_row

Checkbox Element

Get

SetFocus

SetTooltip

Update

bind

expand

get

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Column Element

AddRow

Layout

SetFocus

SetTooltip

Update

add_row

bind

expand

get_size

hide_row

layout

set_cursor

set_focus

set_size

set_tooltip

unbind

set_vscroll_position

unhide_row

update

Combo Element

Get

SetFocus

SetTooltip

Update

bind

expand

get

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Frame Element

AddRow

Layout

SetFocus

SetTooltip

Update

add_row

bind

expand

get_size

hide_row

layout

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Graph Element

BringFigureToFront

DeleteFigure

DrawArc

DrawCircle

DrawImage

DrawLine

DrawOval

DrawPoint

DrawPolygon

DrawRectangle

DrawText

Erase

GetBoundingBox

GetFiguresAtLocation

Move

MoveFigure

RelocateFigure

SendFigureToBack

SetFocus

SetTooltip

TKCanvas

Update

bind

bring_figure_to_front

change_coordinates

delete_figure

draw_arc

draw_circle

draw_image

draw_line

draw_oval

draw_point

draw_polygon

draw_rectangle

draw_text

erase

expand

get_bounding_box

get_figures_at_location

get_size

hide_row

move

move_figure

relocate_figure

send_figure_to_back

set_cursor

set_focus

set_size

set_tooltip

tk_canvas

unbind

unhide_row

update

HorizontalSeparator Element

SetFocus

SetTooltip

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

Image Element

SetFocus

SetTooltip

Update

UpdateAnimation

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

update_animation

update_animation_no_buffering

InputText Element

Get

SetFocus

SetTooltip

Update

bind

expand

get

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Listbox Element

GetIndexes

GetListValues

SetFocus

SetTooltip

SetValue

Update

bind

expand

get

get_indexes

get_list_values

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

set_value

set_vscroll_position

unbind

unhide_row

update

Menu Element

SetFocus

SetTooltip

Update

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Multiline Element

Get

SetFocus

SetTooltip

Update

bind

expand

get

get_size

hide_row

print

set_cursor

set_focus

set_size

set_tooltip

set_vscroll_position

unbind

unhide_row

update

OptionMenu Element

SetFocus

SetTooltip

Update

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

set_vscroll_position

unbind

unhide_row

update

Output Element

Get

SetFocus

SetTooltip

TKOut

Update

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

tk_out

set_vscroll_position

unbind

unhide_row

update

Pane Element

SetFocus

SetTooltip

Update

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

ProgressBar Element

SetFocus

SetTooltip

Update

UpdateBar

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

update_bar

Radio Element

Get

ResetGroup

SetFocus

SetTooltip

Update

bind

expand

get

get_size

hide_row

reset_group

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Slider Element

SetFocus

SetTooltip

Update

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Spin Element

Get

SetFocus

SetTooltip

Update

bind

expand

get

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

StatusBar Element

SetFocus

SetTooltip

Update

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

SystemTray

Close

Hide

Read

ShowMessage

UnHide

Update

close

hide

notify

read

show_message

un_hide

update

Tab Element

AddRow

Layout

Select

SetFocus

SetTooltip

Update

add_row

bind

expand

get_size

hide_row

layout

select

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

TabGroup Element

FindKeyFromTabName

Get

SetFocus

SetTooltip

bind

expand

find_key_from_tab_name

get

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

set_vscroll_position

unbind

unhide_row

Table Element

Get

SetFocus

SetTooltip

Update

bind

expand

get

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Text Element

Get

SetFocus

SetTooltip

Update

bind

expand

get

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

update

Tree Element

SetFocus

SetTooltip

Update

add_treeview_data

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

set_vscroll_position

unbind

unhide_row

update

TreeData (for Tree Element)

Insert

Node

insert

VerticalSeparator Element

SetFocus

SetTooltip

bind

expand

get_size

hide_row

set_cursor

set_focus

set_size

set_tooltip

unbind

unhide_row

Window

AddRow

AddRows

AlphaChannel

BringToFront

Close

CurrentLocation

Disable

DisableDebugger

Disappear

Elem

Element

Enable

EnableDebugger

Fill

Finalize

Find

FindElement

FindElementWithFocus

GetScreenDimensions

GrabAnyWhereOff

GrabAnyWhereOn

Hide

Layout

LoadFromDisk

Maximize

Minimize

Move

Normal

Read

Reappear

Refresh

SaveToDisk

SendToBack

SetAlpha

SetIcon

SetTransparentColor

Size

UnHide

VisibilityChanged

add_row

add_rows

alpha_channel

bind

bring_to_front

close

current_location

disable

disable_debugger

disappear

elem

element

element_list

enable

enable_debugger

extend_layout

fill

finalize

find

find_element

find_element_with_focus

get_screen_dimensions

get_screen_size

grab_any_where_off

grab_any_where_on

hide

layout

load_from_disk

maximize

minimize

move

normal

read

reappear

refresh

save_to_disk

send_to_back

set_alpha

set_icon

set_title

set_transparent_color

size

un_hide

visibility_changed

Window

AddRow

AddRows

AlphaChannel

BringToFront

Close

CurrentLocation

Disable

DisableDebugger

Disappear

Elem

Element

Enable

EnableDebugger

Fill

Finalize

Find

FindElement

FindElementWithFocus

GetScreenDimensions

GrabAnyWhereOff

GrabAnyWhereOn

Hide

Layout

LoadFromDisk

Maximize

Minimize

Move

Normal

Read

Reappear

Refresh

SaveToDisk

SendToBack

SetAlpha

SetIcon

SetTransparentColor

Size

UnHide

VisibilityChanged

add_row

add_rows

alpha_channel

bind

bring_to_front

close

current_location

disable

disable_debugger

disappear

elem

element

element_list

enable

enable_debugger

extend_layout

fill

finalize

find

find_element

find_element_with_focus

get_screen_dimensions

get_screen_size

grab_any_where_off

grab_any_where_on

hide

layout

load_from_disk

maximize

minimize

move

normal

read

reappear

refresh

save_to_disk

send_to_back

set_alpha

set_icon

set_transparent_color

size

un_hide

visibility_changed

Function Reference

These are the functions available for you to call

Button No Longer To Be Used

Note - These are no longer recommended! They are shown here in case you run into them in some old code.

Debug Window Output

Color Printing to Multiline Element of a Window

OneLineProgressMeter

Popup Functions

Popups PEP8 Versions

Same as popup_scrolled

PEP8 Function Bindings

Settings

Non PEP8 version (same as PEP8 version)

The Test Harness

Used to test the installation, get information about the versions, upgrade from GitHub

Debugger

Themes

Misc

Old Themes (Look and Feel) - Replaced by theme()