[Tutor] How I use images in a GUI?

Nathan Pinno falcon3166 at hotmail.com
Mon Nov 7 02:22:27 CET 2005


MessageLiam,
I am using Pygame, but I am still don't know how to use it. I read it, and it confused me.
  ----- Original Message ----- 
  From: Liam Clarke-Hutchinson<mailto:Liam.Clarke-Hutchinson at business.govt.nz> 
  To: 'Nathan Pinno'<mailto:falcon3166 at hotmail.com> 
  Cc: 'tutor at python.org'<mailto:'tutor at python.org'> 
  Sent: November 6, 2005 3:47 PM
  Subject: RE: [Tutor] How I use images in a GUI?


  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.
   http://www.wxpython.org/docs/api/wx.BitmapButton-class.html<http://www.wxpython.org/docs/api/wx.BitmapButton-class.html>

  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.

  Regards, 
  Liam Clarke-Hutchinson| Contact Centre Advisor| Ministry of Economic Development 
  DDI +64 3 962 2639 | Fax +64 3 962 6220
  www.med.govt.nz<http://www.med.govt.nz/> 

    -----Original Message-----
    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?


    Hey all,

    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,
    Nathan Pinno


  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<http://news.business.govt.nz/> for more details.






   

    
  govt.nz<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...
URL: http://mail.python.org/pipermail/tutor/attachments/20051106/45e9a0cb/attachment-0001.html


More information about the Tutor mailing list