2
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by Paul Thompson
0

You would use a GUI module such as wxPython to do it. As to not just give you the answer but to point you in the right direction here is a basic frame with one button on it.

import wx

app = wx.App(redirect=False)
frame = wx.Frame(None, wx.ID_ANY,title = "Example")
button = wx.Button(frame,wx.ID_ANY,label = "Click me... but nothing will happen")
app.MainLoop()

perhaps you could find out how to add that other button and for the image you might want to look at this code snippet:
http://www.daniweb.com/code/snippet654.html

If you have any question just post them. :)

0

thanks paulthom12345 but ive some more difficulties can any1 help

im using python 2.5 and ive installed wxPython2.8-win32-unicode-2.8.9.1-py25
n also im using win XP but still when i write the codes nothing(frame or window) appears
also i wrote the code n saved it as simple.py yet no result

0

Can i just say, it was my fault, i have an error in my code. Woops.
Please add

frame.Show(True)

just before the app.MainLoop() statement.

That will make the frame show.

Sorry for the error :P

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.