windows彈窗庫pymsgbox簡單使用


一、代碼

import pymsgbox

pymsgbox.alert(text='', title='', button='OK')
pymsgbox.confirm(text='', title='', buttons=['OK', 'Cancel'])
pymsgbox.prompt(text='', title='' , default='')
pymsgbox.password(text='', title='', default='', mask='*')

# 彈窗確認框
pymsgbox.alert('This is an alert.', 'Alert!')

# 選擇確認框
pymsgbox.confirm('你是否要查看以下內容?', '查看確認', ["確定", '取消'])

# 密碼輸入框,mask指定密碼代替符號
res=pymsgbox.password('Enter your password.',mask='$')
print(res)

# 默認輸入框
pymsgbox.prompt('What does the fox say?', default='This reference dates this example.')

# 選擇確認框,設置時間后自動消失
pymsgbox.confirm('你是否要查看以下內容?', '查看確認', ["確定", '取消'], timeout=2000)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM