Posted 20 October 2009 - 03:02 PM
I've been following some tutorials online. Python is my first programming language. I've been trying to start fresh with each tutorial to minimize confusion and then o test my mastery of the language I have a separate file where I compile all I've learned and mess with it.
Anyways, I learned how to make a bitmap button, it worked in the clean version, but when I added it it did not appear. Only one of the buttons was there.
I only really liked the idea of adding an image to my program, so I started searching the web for an explanation or at least an example of how to add an image. I can't find much that will help me, so maybe some of you who are good with python could take a look and advise me? This is the program in it's working form without the bitmap button.
PS, format is funky but it works...
def __init__(self,parent, id):
wx.Frame.__init__(self,parent,id,'Windows 69:Buttsex Edition', size=(550,400))
first.Append(wx.NewId(),"Activate Magnetic Surge","Warning: erratic bursts of magnetism may loss of data." )
first.Append(wx.NewId(),"Download some drivers","We're hoping you know nothing about drivers. If we are mistaken, please disreguard this option." )
second.Append(wx.NewId(),"About","Windows 69:Buttsex Edition is the only operating system available exclusively for homosexuals and the bi curious." )
second.Append(wx.NewId(),"Search Online for Solutions","Windows has lost connection with both Wired and Wireless networks. What a coincidence." )
boxx=wx.TextEntryDialog(None, "Terminal has been locked due to inactivity. Please enter your Password to proceed: ", "Windows Login Assistant", "Password")
wx.StaticText(panel, -1, answer, (230,300))
box=wx.MessageDialog(None,'Did you want me to download some viruses today?','Windows Virus Acquisition Assistant',wx.YES_NO)
textbox=wx.SingleChoiceDialog(None,'You have selected Yes! To get started, choose one of the following virus options you\'d think would best reduce your machine to useless lumps of plastic and metal!', 'Welcome to the Microsoft Windows Virus Acquisition Module!',['Spam the email of my friends and family','Access and distribute my financial documents','Slowly lower the RPM of my cooling fans over the course of an hour and auto ignore temperature failure warnings','Make my computer a server that facilitates the transfer and storage of child pornography'])
wx.StaticText(panel, -1, "Windows has encountered a fatal error!", (50,10), (400, -1),wx.ALIGN_CENTER)
flair=wx.StaticText(panel, -1, "You have no chance to survive make your time...", (50,30), (400, -1),wx.ALIGN_CENTER)
detail=wx.StaticText(panel, -1, "Thanks for your password, chump", (5,300), (-1, -1),wx.ALIGN_BOTTOM)
button=wx.Button(panel,label="Click to continue with hard drive reformat.",pos=(150,250),size=(220,40))
self.Bind(wx.EVT_BUTTON, self.closebutton, button)
def closewindow(self, event):