0

I have a command menu of 'Submenu' of File menu, which was initially disabled. I want to enable the command menu if a particular condition is fulfilled during execution. Please help.

menubar=tk.Menu(hW)
filemenu=tk.Menu(menubar,tearoff=0)
filemenu.add_command(label='Open',command=FileOpen)
filemenu.add_command(label='Submenu',
                                command=command1,state='disabled')
menubar.add_cascade(label='File',menu=filemenu)

1 Answer 1

1

I am sorry to bother you all. The answer is so simple as:

filemenu.entryconfig('Submenu',state='normal')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.