MCPcopy Create free account
hub / github.com/pywebio/PyWebIO / show_popup

Function show_popup

test/template.py:129–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 ], onclick=lambda pos: scroll_to('scroll_basis', pos))
128
129 def show_popup():
130 popup('Popup title', [
131 put_html('<h3>Popup Content</h3>'),
132 'html: <br/>',
133 put_table([
134 ['Type', 'Content'],
135 ['html', put_html('X<sup>2</sup>')],
136 ['text', '<hr/>'],
137 ['buttons', put_buttons(['A', 'B'], onclick=put_text)],
138 ['markdown', put_markdown('`Awesome PyWebIO!`')],
139 ['file', put_file('hello.text', b'')],
140 ['table', put_table([['A', 'B'], ['C', 'D']])]
141 ]),
142 put_buttons(['close_popup()'], onclick=lambda _: close_popup())
143 ], size=PopupSize.NORMAL)
144
145 with use_scope('popup_btn'):
146 put_buttons([('popup()', '')], onclick=[show_popup])

Callers

nothing calls this directly

Calls 7

popupFunction · 0.85
put_htmlFunction · 0.85
put_tableFunction · 0.85
put_buttonsFunction · 0.85
put_markdownFunction · 0.85
put_fileFunction · 0.85
close_popupFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…