Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Tkinter
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Fredrik Lundh, post: 1874007"] the example on that page attaches the image to a widget instance, not a canvas object handle (which is an integer; unlike user-defined classes, integers don't allow you to attach arbitrary attributes to them). if you just want to display a single image, just attach it to self: BackgroundFile = PhotoImage(file="Background.GIF") Background = self.MainFrame.create_image(0, 0, image=BackgroundFile) self.image = BackgroundFile # keep a reference! if you want to display multiple images on the canvas, use a dictionary or a list to hold active image references. </F> [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Tkinter
Top