How to add ynbox and messagebox in same window usi

2019-08-20 05:07发布

问题:

I run following code :

import easygui
easygui.ynbox('Shall I continue?', 'Title', ('Yes', 'No'))
easygui.msgbox('This is a basic message box.', 'Title Goes Here');

but i get different window for ynbox and msgbox ,i want bot both of them to be included in same window

回答1:

Just do single ynbox:

import easygui
easygui.ynbox('Question', 'Title', ('Yes', 'No'))

Or do buttonbox:

import os
easygui.buttonbox('Message', 'Title', choices=(['Button[1]', 'Button[2]' , 'Button[3]']))