Apr-17-2024, 12:51 PM
Hi,
Thanks for the response but it's not quite what I wanted.
This is how I create my main drop down menu which works fine, I hope it helps.
I wanted to add a submenu to Item6, which are: sub1 and sub2
Var1 = tk.StringVar(Fbtn1)
list=[' Item1 ) ',' Item2 ',' Item3 ',' Item4 ',' Item5 ',' Item6 ) ']
Mbtn1 = ttk.OptionMenu(Fbtn1, Var1, list[2], *list,style= 'O.TLabel',
command = (Dropdown_Main_Menu))
Mbtn1['menu'].configure(background= 'lightgray') # Change Menu Background Colour
Any advise how to add a submenu to the code would be most appreciated.
Robo
Thanks for the response but it's not quite what I wanted.
This is how I create my main drop down menu which works fine, I hope it helps.
I wanted to add a submenu to Item6, which are: sub1 and sub2
Var1 = tk.StringVar(Fbtn1)
list=[' Item1 ) ',' Item2 ',' Item3 ',' Item4 ',' Item5 ',' Item6 ) ']
Mbtn1 = ttk.OptionMenu(Fbtn1, Var1, list[2], *list,style= 'O.TLabel',
command = (Dropdown_Main_Menu))
Mbtn1['menu'].configure(background= 'lightgray') # Change Menu Background Colour
Any advise how to add a submenu to the code would be most appreciated.
Robo