📜  如何下车和放置 ipywidgets - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:51.187000             🧑  作者: Mango

代码示例1
from ipywidgets import widgets
from IPython.display import Javascript, display

align_kw = dict(
    _css = (('.widget-label', 'min-width', '20ex'),),
    margin = '0px 0px 5px 12px'
)
platform_ui = widgets.Dropdown(description = 'platform',options=['iPhone','iPad','Android'], **align_kw)
event_type_ui = widgets.Text(value='open', description='Test Event', **align_kw)
os_version_ui = widgets.Text(value='iOS9', description='Operating System', **align_kw)
refresh_ui = widgets.Checkbox(description='Force Refresh', **align_kw)

display(platform_ui,event_type_ui,os_version_ui,refresh_ui)