使用 ipywidgets 創建按鈕的方式基本如下:
import ipywidgets as widgets
layout_btn = widgets.Layout(width='200px')
mybtn = widgets.Button(description='load',
disabled=False,
button_style='', # 'success', 'info', 'warning', 'danger' or ''
tooltip='this will happen:...',
icon='',
layout=layout_btn)
在 Layout 物件中可以定義幾件事:請參見此處:

按照鏈接了解有關樣式屬性的更多詳細資訊。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/447670.html
標籤:Python 按钮 ipywidgets
上一篇:選中檢查按鈕時無法阻止欄位
