How to remove dashed line from my menu UI?

python, tkinter

Solution

Set `tearoff` option of `fileMenu` to `False` (or `0`)

fileMenu = Menu(menubar, tearoff=False)

Problem

I'm trying to add a "Open file" file tab on my UI. Works ok, but a `---------` line is showing up at the top of the tab and I want to remove it. I don't know why that line is showing up and I can't find the line on the code. This is my code: ``` # -*- coding: utf-8 -*- from Tkinter import * import Image import ImageTk import tkFileDialog class Planificador(Frame): def __init__(self,master): Frame.__init__(self, master) self.master = master self.initUI() def initUI(self): self.master.title("test") menubar = Menu(self.master, tearoff=0) self.master.config(menu=menubar) fileMenu = Menu(menubar) fileMenu.add_command(label="Open config file", command=self.onOpen) menubar.add_cascade(label="File", menu=fileMenu) fileMenu.add_separator() fileMenu.add_command(label="Exit", command=root.quit) self.txt = Text(self) self.txt.pack(fill=BOTH, expand=1) def onOpen(self): ftypes = [('Python files', '*.py'), ('All files', '*')] dlg = tkFileDialog.Open(self, filetypes = ftypes) fl = dlg.show() if fl != '': text = self.readFile(fl) self.txt.insert(END, text) def readFile(self, filename): f = open(filename, "r") text = f.read() return text # Main if __name__ == "__main__": # create interfacE root = Tk() aplicacion = Planificador(root) root.mainloop() ``` I would like to know where I can remove that `-------` from the code. Thanks in advance

Original source