如何在python中完全在框架上扩展vlc视频面板

时间:2018-10-23 17:21:25

标签: python user-interface tkinter

在下面的代码中(请注意,这是我的代码的一小部分),我想将视频屏幕完全扩展到框架中,但它不是处于完整模式,而是部分扩展。我该如何解决我的问题。我认为我必须更改“ self.videopanel.pack(fill = Tk.BOTH,expand = 1)”部分来解决我的问题,但我不知道如何解决。请在图中查看我的问题:[注意红线间隙是我的问题。

class Player(Tk.Frame):
"""The main window has to deal with events.
"""
def __init__(self, parent, title=None):
    Tk.Frame.__init__(self, parent)

    self.parent = parent

    if title == None:
        title = "tk_vlc"
    self.parent.title(title)

    # Menu Bar
    #   File Menu
    menubar = Tk.Menu(self.parent)
    self.parent.config(menu=menubar)

    fileMenu = Tk.Menu(menubar)
    fileMenu.add_command(label="Open", underline=1, command=self.OnOpen)
    fileMenu.add_command(label="About", underline=1, command=_About)
    fileMenu.add_command(label="Exit", underline=1, command=_quit)
    menubar.add_cascade(label="File", menu=fileMenu)


    # The second panel holds controls
    self.player = None
    self.videopanel = ttk.Frame(self.parent)
    self.canvas = Tk.Canvas(self.videopanel).pack(fill=Tk.BOTH,expand=1)
    self.videopanel.pack(fill=Tk.BOTH,expand=1)

I want to delete this gap so I expand it completely without any gap

0 个答案:

没有答案