使用python 3.x在tkinter中分组笔记本

时间:2015-01-30 17:18:05

标签: python user-interface python-3.x tkinter tkinter-canvas

我正在使用tkinter创建一个使用python 3.x的简单GUI。我想对使用ttk.Notebook创建的某些标签进行分组,因为我有很多标签,屏幕尺寸变得庞大而且没有组织。有没有办法对使用ttk notebook

创建的数据进行分组

代码到现在为止:

gui_optimizer.configure(background="#a1dbcd")

tab = ttk.Notebook(gui_optimizer)

main_options = tkinter.Frame(tab, bg="#a1dbcd") # Main options
file_customizations = tkinter.Frame(tab, bg="#a1dbcd") # File related options
other_options_1 = tkinter.Frame(tab, bg="#a1dbcd") # Most used GUI pages
other_options_2 = tkinter.Frame(tab, bg="#a1dbcd") 
other_options_3 = tkinter.Frame(tab, bg="#a1dbcd")

tab.add(main_options, text='Main options')
tab.add(file_customizations, text='File customizations')
tab.add(other_options_1, text="Aux options 1")
tab.add(other_options_2, text="Aux options 2")
tab.add(other_options_3, text="Aux options 3")

我想将Aux options分组到一个标签中,当我点击它时,它可以显示分组的选项。任何想法都会非常有用....

0 个答案:

没有答案