[Anygui-users] images in anygui
Brought to you by:
mlh
From: Dennis G. <de...@li...> - 2004-10-20 21:14:25
|
I am new to anygui. I very much like the speed at which I am able to develop an interface and the size of the code. Tkinter is what I have used in the past. I have a question. Looked in the archives, perhaps I missed it. I would like to include an image in my app, but have not figured out the right magic and incantations to do so. :) I have something like this...hopefully, there is enough to get the idea of what I am trying to accomplish. I don't get any errors, but on the Frame, I see the word Label. Can someone pull the mud from my eyes? Thanks, tons! from anygui import * import Image, ImageTk class MainFrame: def __init__( self, parent ): self.filename = 'gnome-unknown.png' self.file = Image.open(self.filename) self.image = ImageTk.PhotoImage(self.file) self.theScan = Label(image = self.image, position = (225, 200)) fMain.add(self.theScan) win.add(fMain, hmove = 1) app = Application() win = Window(size = ( 650, 475 )) app.add(win) fMain = Frame(frameOpt) MainFrame(fMain) app.run() dennis - have gudulka, will travel http://KafanaKlub.com |