Nein ich will eigentlich schon, dass es Livebilder sind, also, dass z.B. mit einer bestimmten fps-Intervall andauernd Bilder abgegriffen werden.
Code: Alles auswählen
import Tkinter
import os # needed for relative image paths
# Using new-style classes: create empty base class object
# for compatibility with older python interps
#if sys.version_info < (2, 2):
# class object:
# pass
class Preview(object):
_images = [] # Holds image refs to prevent GC
def __init__(self, root):
# Widget Initialization
self._frame_1 = Tkinter.Frame(root,
)
self._label_1 = Tkinter.Label(root,
font = "{Times New Roman TUR} 20 bold",
relief = "sunken",
state = "active",
text = "FaceDec",
)
self._button_1 = Tkinter.Button(root,
font = "{Times New Roman TUR} 8",
text = "Bild speichern",
)
self._label_2 = Tkinter.Label(root,
text = "#Kurze Programmanleitung...",
)
self._listbox_1 = Tkinter.Listbox(root,
height = 0,
width = 0,
)
self._label_3 = Tkinter.Label(root,
text = "(C) 2010",
)
# widget commands
self._button_1.configure(
command = self._button_1_command
)
self._listbox_1.configure(
xscrollcommand = self._listbox_1_xscrollcommand
)
self._listbox_1.configure(
yscrollcommand = self._listbox_1_yscrollcommand
)
# Geometry Management
self._frame_1.grid(
in_ = root,
column = 2,
row = 1,
columnspan = 1,
ipadx = 0,
ipady = 0,
padx = 0,
pady = 0,
rowspan = 1,
sticky = "news"
)
self._label_1.grid(
in_ = root,
column = 1,
row = 1,
columnspan = 1,
ipadx = 0,
ipady = 0,
padx = 0,
pady = 0,
rowspan = 1,
sticky = "n"
)
self._button_1.grid(
in_ = root,
column = 2,
row = 2,
columnspan = 1,
ipadx = 0,
ipady = 0,
padx = 0,
pady = 0,
rowspan = 1,
sticky = "n"
)
self._label_2.grid(
in_ = root,
column = 1,
row = 2,
columnspan = 1,
ipadx = 0,
ipady = 0,
padx = 0,
pady = 0,
rowspan = 1,
sticky = ""
)
self._listbox_1.grid(
in_ = root,
column = 2,
row = 3,
columnspan = 1,
ipadx = 0,
ipady = 0,
padx = 0,
pady = 0,
rowspan = 1,
sticky = "news"
)
self._label_3.grid(
in_ = root,
column = 1,
row = 3,
columnspan = 1,
ipadx = 0,
ipady = 0,
padx = 0,
pady = 0,
rowspan = 1,
sticky = ""
)
# Resize Behavior
root.grid_rowconfigure(1, weight = 0, minsize = 237, pad = 0)
root.grid_rowconfigure(2, weight = 0, minsize = 220, pad = 0)
root.grid_rowconfigure(3, weight = 0, minsize = 40, pad = 0)
root.grid_columnconfigure(1, weight = 0, minsize = 513, pad = 0)
root.grid_columnconfigure(2, weight = 0, minsize = 382, pad = 0)
Das wär der ganze Code, ich habs noch nicht ausgestaltet, es sieht nur ungefähr so aus, wies mal ausschauen sollte.
Ich hoffe, ihr könnt mir dabei behilflich sein.