0
即时尝试使tkinter窗口显示图像 但是当我在tkinter窗口中打开图像时 - 图像的一部分显示在窗口的任务栏下方, 因为的,我不能老是查看该图像的底部部分如何在窗口的任务栏上方设置tkiner窗口
示出具有标签的照片IM(其画面的一部分 - 共享程序,每一秒另一图像显示Tkinter的窗口上)
**照片的大小是所有屏幕的大小
即时通讯不确定我的代码是真的有必要,我的问题就是如何设置Tkinter的窗口的任务栏上面.. :)
def ShowImage():
global root
root = Tkinter.Tk()
try:
label = Tkinter.Label(root)
label.pack()
img = None
tkimg = [None] # This, or something like it, is necessary because if you do not keep a reference to PhotoImage instances, they get garbage collected.
delay = 2 # in milliseconds
def loopCapture():
#print "capturing"
global im
while im==None:
continue
img = im
tkimg[0] = ImageTk.PhotoImage(img)
label.config(image=tkimg[0])
root.update_idletasks()
root.after(delay, loopCapture)
loopCapture()
即时通讯不知道我的代码是否真的有必要,我的问题是如何在windows的任务栏上方设置tkinter .. :) –