0

I'm new to Tkinter and while experimenting with it, I hit a problem, The color of the cascade menu could be changed easily but the border cannot be removed. Is there a cross platform way to do it? I want the border to be either of the same color as background or be removed. [Here's the snippet][1]

from tkinter import*  
root= Tk()  
root.configure(bg="#20232A")  
root.geometry("500x500")  
menubar = Menu(root)  

File= Menu(menubar, tearoff = 0, bg="#20232A", fg="#ffffff", bd=0)  
File.add_command(label="New File                       Ctrl+N")  
File.add_command(label="New Window          Ctrl+Shift+N")  
File.add_separator()  
File.add_command(label="Recent           ")  
File.add_command(label="Open                            Ctrl+O")  
File.add_separator()  
File.add_command(label="Save                              Ctrl+S")  
File.add_command(label="Save as                    Ctrl+Shift+S")  
File.add_separator()  
File.add_command(label="Quit                             Alt+F4")  
menubar.add_cascade(label="File", menu=File)  


root.config(menu=menubar)  
root.mainloop()  
Akr_26
  • 1
  • 1
  • Please add your code so we can check what's wrong or whar are you trying: https://stackoverflow.com/help/minimal-reproducible-example – jcf May 21 '20 at 08:00
  • ***How to remove the border of the cascade menu***: Does this answer your question? [a-customized-menu-bar-without-using-the-widget-tk-menu](https://stackoverflow.com/questions/60730049) – stovfl May 21 '20 at 10:41
  • @stovfl: Yes, it works. – Akr_26 May 21 '20 at 11:40

1 Answers1

0

Try with the argument bd = 0 wich should set border's size to 0 while making your cascade menu.

Quantum Sushi
  • 504
  • 7
  • 23