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