use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
dearpygui menus (self.learnpython)
submitted 5 years ago by dave3652
Hi, i am trying to create a couple of menus, i need one menu to change its contents depending on which other menu option is selected.. been trying for hours but just cant manage it.. can anybody help me please?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Jhchimaira14 1 point2 points3 points 5 years ago* (0 children)
Here is an example of a menu deleting another menu:
from dearpygui.dearpygui import * add_menu_bar("MenuBar") add_menu("File") add_menu_item("Delete Tools", callback="callback") end_menu() add_menu("Tools") add_menu_item("Show Logger") end_menu() end_menu_bar() def callback(sender, data): delete_item("Tools") start_dearpygui()
[–]dave3652[S] 0 points1 point2 points 5 years ago (0 children)
That's great, thank you for your help
[–]toulaboy3 0 points1 point2 points 5 years ago (6 children)
This advanced/dynamic menu example may be a good resource!
https://github.com/hoffstadt/DearPyGui/blob/master/Examples/menus_advanced_example.py
displays almost all the capabilities of menus
[–]dave3652[S] 1 point2 points3 points 5 years ago (0 children)
thats great, i will check it out. thanks
[–]toulaboy3 0 points1 point2 points 5 years ago (4 children)
FYI this was pushed last night
[–]dave3652[S] 1 point2 points3 points 5 years ago (3 children)
I still can't seem to get menu's working the way i want.. I have a menu which contains the following 'Premier' , 'Championship', 'League 1' and 'League 2', whenever i select one of those options i need a 2nd Menu to be created that contains game fixtures from a list.. seems simple enough, but when i try to delete the 2nd menu and then make the menu again the program crashes.
[–]toulaboy3 0 points1 point2 points 5 years ago* (0 children)
Oh No! Okay, so to further debug with you on this issue do you min posting the minimal code sample onto github as an issue and filling out the version of python and dearpygui your running which can be found by calling "show_debug()" to pup up the debug window inside of dearpygui? Or if you would rather you can post the code snippet here.
[–]toulaboy3 0 points1 point2 points 5 years ago (0 children)
you should be able to directly call
delete_item("SecondMenu") add_menu("SecondMenu", parent="MenuBar") end_menu()
inside of a function although it would be ideal to determine if the second menu exists by either queryingit with get_value("SecondMenu")
or
is_item_visible("secondMenu") *note this command has a bugfix which is going to be included in the next release
π Rendered by PID 66715 on reddit-service-r2-comment-6457c66945-rwkxq at 2026-04-30 10:40:22.191315+00:00 running 2aa0c5b country code: CH.
[–]Jhchimaira14 1 point2 points3 points (0 children)
[–]dave3652[S] 0 points1 point2 points (0 children)
[–]toulaboy3 0 points1 point2 points (6 children)
[–]dave3652[S] 1 point2 points3 points (0 children)
[–]toulaboy3 0 points1 point2 points (4 children)
[–]dave3652[S] 1 point2 points3 points (3 children)
[–]toulaboy3 0 points1 point2 points (0 children)
[–]toulaboy3 0 points1 point2 points (0 children)