[Tutor] How I use images in a GUI?
Liam.Clarke-Hutchinson at business.govt.nz
Sun Nov 6 23:47:11 CET 2005
Depends on your GUI toolkit and widget.
For instance, in wxPython's wx.BitmapButton widget, there's a specific
method to set the bitmap, and then the underlying C++ code interfaces with
the GDI portion of the Win32 API and draws it for you.
I'm not too sure about Tkinter, but I assume it's the same way.
With regards to games, I suggest you check out www.pygame.org
<http://www.pygame.org> , instead of trying to use a GUI framework as it
makes basic game development very simple, whereas a GUI framework doesn't.
Especially with adding images to shapes on screen.
Liam Clarke-Hutchinson| Contact Centre Advisor| Ministry of Economic
DDI +64 3 962 2639 | Fax +64 3 962 6220
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf
Of Nathan Pinno
Sent: Monday, 7 November 2005 11:29 a.m.
To: Tutor Mailing List
Subject: [Tutor] How I use images in a GUI?
I have a question that I can't figure out, despite reading the help and
everything else. How do I use an image or images in a Graphic User
Interface, and link them to parts of my code i.e. a picture of a game piece
to its value?
Thanks in advance,
A new monthly electronic newsletter covering all aspects of MED's work is now available. Subscribers can choose to receive news from any or all of seven categories, free of charge: Growth and Innovation, Strategic Directions, Energy and Resources, Business News, ICT, Consumer Issues and Tourism. See http://news.business.govt.nz for more details.
http://www.govt.nz - connecting you to New Zealand central & local government services
Any opinions expressed in this message are not necessarily those of the Ministry of Economic Development. This message and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivery to the intended recipient, be advised that you have received this message in error and that any use is strictly prohibited. Please contact the sender and delete the message and any attachment from your computer.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor