referwork = ttk.Notebook(root, style =".TNotebook")
f1 = ttk.Frame(referwork)
f2 = ttk.Frame(referwork)
referwork.add(f1, text="Search", padding = 1)
referwork.add(f2, text="Add/Delete", padding = 1)
#referwork.configure (height = 500, width = 800)
referwork.grid(row=0, column=0, sticky=(N,W,S,E))
我已经使用上面的方法创建了一个包含两个标签的笔记本。首先执行搜索。What I want to do is to have an alert in a message box appear messagebox.askyesno and when 'yes' is selected that the focus moves to the second page of the notebook
messagebox.askyesno(0.0,'"{0}"{1} \n {2}\n'.format(search_analyte.get(),' is not in the database.','Add,if appropriate'))
if True:
据我所知。我无法弄清楚如何使用此对话和条件“打开”第二页。非常感谢您的帮助