Can anyone please help me as i am new to python, i have a requirement for a cascaded menu(which should be dynamically built).

The cascaded menu should have new at all levels and when the user clicks on new it should ask for keyword and when done it should add that as a menu item and it should rebuild the cascaded menu with that new thing included. So the user should be allowed to build his own cascaded menu hierarchy.
If any body has any ideas, please help me.

Thanks in advance ...

6 Years
Discussion Span
Last Post by richieking

So your looking at GUI's? Tkinter would be your best bet. Look up how to create cascading menu's. I have a couple of youtube videos on them as well.
Just apply your own logic for how to create them from user input. It should be fairly simple.

Text documentation/tutorial:
My videos:
(You would probably only need the first one)

Please upvote if this helped :)


Thank you for ur reply...
i know how to create cascaded menus, but what i want is the ability for user interaction to add new menu items at each level, Can any one please help me...


OK here goes:
Start by making the base of your toolbar, without any dropdown bits in it. You will need a loop. At the top of the loop, you ask for the user to input a string. This string will be the label for a new button on the menu. Then, create a the item on the menu in the same base toolbar you made earlier, with the label being the string the user put in. You just need to pass variables to the statements that create the menu item.


having a while loop besides the main loop in a GUI is not advisable as it can cause a freeze.

Why not simply have use to menu event tool to update the casscading menu and increase by foo += 1 or foo -=1. Push the newly created into list/dict or even a conf file and update from the list/dic/file inside the menu event method....
That is my take


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.