MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / item_row

Function item_row

DemoPrograms/Demo_Layout_Add_and_Delete_Rows.py:19–29  ·  view source on GitHub ↗

A "Row" in this case is a Button with an "X", an Input element and a Text element showing the current counter :param item_num: The number to use in the tuple for each element :type: int :return: List

(item_num)

Source from the content-addressed store, hash-verified

17
18
19def item_row(item_num):
20 """
21 A "Row" in this case is a Button with an "X", an Input element and a Text element showing the current counter
22 :param item_num: The number to use in the tuple for each element
23 :type: int
24 :return: List
25 """
26 row = [sg.pin(sg.Col([[sg.B(sg.SYMBOL_X, border_width=0, button_color=(sg.theme_text_color(), sg.theme_background_color()), k=('-DEL-', item_num), tooltip='Delete this item'),
27 sg.In(size=(20,1), k=('-DESC-', item_num)),
28 sg.T(f'Key number {item_num}', k=('-STATUS-', item_num))]], k=('-ROW-', item_num)))]
29 return row
30
31
32def make_window():

Callers 2

make_windowFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected