Added: 2 years ago
From: thenewboston
Views: 37,860
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (119)

Sign In or Sign Up now to post a comment!
  • I need help with coordinates. I can't picture where 60,70 would be, or 100,150 would be. Does anyone have any advice?

  • 100,150 would mean the upper left corner of the button is 100 pixels to the right, and 150 pixels down. just play around with it, change the numbers and execute the program a few times to get a feeling for it.

  • to dodododis dododa

  • app=ex.PySimpleApp()

    Gives me a Depreciated Class warning, and it seams to be the reason my window is always loading and never finishing(also jet black with no name), I am using python 2.7 so i think that might be it, but I do not know were to look to find the proper code to fix this error, its the first real error science I picked up this Tutorial, and its stopping my progression. dos anyone know were or how to fix this?

  • Where I can find your blog or website for more information? Thanks, Greetings from Mexico.

  • @AlberthN95 His website is thenewboston . com

  • @CakeAndPi3 Thank you very much... :)

  • Comment removed

  • @SickSonido The button you want it to affect is the third parameter. Say I had a button called Bucky.

    self.Bind(wx.EVT_BUTTON, wahteverfunction(params), Bucky)

  • MainLoop has a capital L in it rrrrr lol

  • i somehow managed to make a dialog box for the exit button work.

    only problem is,it pops up again after choosing either options.

    heres the code:

    def closebutton(self,event):  box=wx.MessageDialog(None,'Are you sure you want to exit?','Are you sure you want to exit?',wx.YES_NO) if box.ShowModal()==wx.ID_YES: self.Close(True) if box.ShowModal()==wx.ID_NO: box.Destroy

    help please?

  • @noobjesss remove the true from the () marks we must be using a differnt version that needs true to be identfied. it works perfect with out the true statement.

  • wxPython 

  • lol I imported wx into IDLE and then did the directory command dir(wx) just to see what commands I can enter for various buttons, and I got like a million different commands. Try it yourself ;)

  • @Kamilk12l More like 3500~ commands.

  • Understand this stuff so much more now getting more interesting, thanks Bucky.

  • Is this 2.6 or 2.7 python?

  • I understand! Since self is a placeholder, when you close self, you close the programe ITself. IM LEARNING!

  • umm...i accidentally made an unclosable program....how do i close it o.O

  • @louisrocks40 Nvm, i used task manager. What i did was i made it re-open after it closed somehow....cool! I dont even know how to do that and i did X-D

  • i put exactly what bucky put up there and it gave me an error and wouldnt even run the window! HELP PLEASE!!!

  • @TheGeekTraining i found the answer you dont need the closewindow part if your using python 2.7.1

  • finnaly it works I forgot the space before size=(300,200).

    so everyone do the cabs AND the spaces exact the same

  • On a Mac 10.6 it doesn't seem that the button size changes. Well, the horizontal size changes, but not the vertical size. Not sure why... *scratches chin*

  • First of all Thanks Bucky. I went through the 43 tutorials of Python and it had a playlist and link to next episodes below each videos. But i am finding the search for next video in this wxPython tutorials little difficult. Is there other place which contains same videos but with link to the next episodes ..

  • alright, i sat here trynna figure it out for the longest of times, i made sure i got my caps where you have yours and it still wont work. however it popped uo when i finished just the window its self?

    would it be possible to get someone to read over what i have typed out and see where i went wrong?

  • Alright....this is emberassing, i'm gonna stop putting comments asking for a bit of help if this keeps up. lol

    just fixed my own issue, how i couldn't tell you.

  • it's not work =(

  • are there any tools for creating GUIs in python by dragging and dropping components? (like netbeans does with java)

  • @scullshot wxGlade

  • know i came make fake apps that people will download and make me money muajjajajajajjajajaja no am not going to do that

  • I got the box, the frame, the button and everything. But, nothing happens when I click on exist or the X. It says 'bucky' object has no attribute 'Destory'. Somebody Help !

  • @nyanpaingtin you typed destroy wrong

  • @OldSqlGaming Thank you so much.....

  • Hi! I get a problem when I lauch this program. The frame doesn't show the button but appears on the screen. It shows the warning; "This window might be busy and is not responding. Do you want to terminate the application?". I use eee pc for Python programming with Xubuntu. What am I doing wrong :( ? Please help.

  • man you rock

  • Come on keyboard!

  • Noooo I spent hours trying to figure out where I stuffed up and it turned out to be that I missed the equals sign on ln6 between 'size' and the '(value)' essentially making Python think I was making a function call there. Now it all works smooth as a big fat smooth thing.

    Big thanks to Holiverh from the New Boston Board for pointing this out.

  • The keyword arg error fix add a bracket

    wx.Frame.__init__(self,parent,­id,'Frame aka Window',size=(300,200))  panel=wx.Panel(self) button=wx.Button(panel,label="­exit",pos=(130,10),size=(60,30­)) self.Bind(wx.EVT_BUTTON, self.closebutton, button) self.Bind(wx.EVT_CLOSE, self.closewindow)

  • @virman123 thanks man you should whrite thumbs up so everyone can see

  • To those got : “ 'bucky' object has no attribute 'closebutton'”

    Try this: put all the ‘def' at exactly same column.

  • @Penny4270 thank you so much :)

  • Thanks a lot , your tutorials are really awesome , it's all I need and searching for now . Thanks again \m/

  • Thanks for the great tutorials, man! I am trying to create an interface to access 2 dictionaries I have. I wanna create like a drop-down menu with possible keys and then get the respective values in the dictionaries. So the user chooses the keys and gets the value in a window or sth.

  • Everytime I run the python code, it opens a window but it freezes. Help, please.

  • @newman30000010 I have the same problem, dunno what would help, please tell me if you find the answer :)

  • when are new videos coming??

    ps you are AWESOME! great tuts!!

  • I hate how whenever I do this in IDLE 2.6.6, I only get the window, but no button.

    Running on Mac OS X 10.6.6 Snow Leopard, by the way, but everything in wx worked before, then for some reason I had to reinstall. =/

  • Bucky You Should Apply For A Teacher Job I Think They Will Pay You A LOT !

    Damn UR GREAT !

  • 5:18 How to close that button? :D

  • When you call self.Close() it sends the EVT_CLOSE event so clicking the button calls both closebutton and then closewindow.

  • 100th like. Yay. Keep up the good work. Ever heard of Game Maker? Its an amateur way to make games... but this is better!

  • There are two letter 'T's in the word 'button' .... could you learn to pronounce at least one of them, please? [hey just kidding -- I have the same regional accent]

  • In Autohotkey program there is SmartGui creator or Lil builder that you design you gui by simple drag and drop of elements and it writes most of the code for you, which you then adjust. Does python have such a utility?

  • @elwoodetubes if you dont wanna right code for your buttons etc try VB 2010 its exactly like that but probly even easyer

  • i clicked on the button, and it said

    "alright, your clicking on me, now what?"

  • everytime i try to run it it gives me this error message - theres an error in your program:

    unindent does not match any outer indentation level! please tell me how to fix this!!!!!!

  • why does it just stay a grey box

  • Getting syntax error

    *** non-keyword arg after keyword arg

    Line 8

  • Learn to say button. not Bah ahn!

  • You should probably change "self.Bind" for "button.Bind", otherwise, every button you click will the same action, close the window.

    Just an advice

    Your tuts are great bucky. I've been watching every one of them, from java to python. Keep'em up!

  • yottabite ?

    omg , super mass storage device

  • syntax error

    There's an error in your program:

    ***non-keyword arg after keyword arg (new,line 8) what is this ?

  • @didagoal yeah got the same. Just found this to help me out a little but I still can't get the button to close.

    (doubleux3).java2s.com/Tutoria­l/Python/0380__wxPython/Setlab­elinbuttonaction.htm

  • if i wanted to add this and also i want to add the menu bar so how would i put it in?

  • I made a mistake and IT WON'T SHUT DOWN!

  • @TheBBrickS alt f4

  • You don't really need the close function over the x do you? i mean, it closes itself without it when you click it.

  • Remember its capa nd lowercase sensitive

  • shit, it doest'n work!!!

  • @annakoiher Check capital letters, it always happen to me.

    

  • how do you make a button spit out static tex, open a file, save a file, save as a file, and open new window. if any one can help me that would be a big help.

  • Thank you v.much. Enjoying my first foray into a GUI programming.

  • thank you very much. helped a lot

  • ttributeError: 'module' object has no attribute 'frame'

    there is error duing the run of wxpython code..............please solve it

  • @3dmad1 Print your code.

  • i have a problem with my one, when i try to run it there is an error where the def in the section: def closewindow(self, event): self.Destroy()

    what have i done wrong??

  • lol i get no errors, but it wont start?

  • why did he put the "=" in the arguments again?, I must have missed that tutorial

  • difficult stuff too understand :(

  • Thank you.

    How would I go about setting the maximum size?

    Example

    Maximum Size (300,200)

  • i am getting a syntax error..any suggestions?

  • @kgpgotenks look for those stupid typos...i.e. not capitalized. if not wait for someone else lol

  • Thanks a lot Bucky

    Keep up the good work

  • how come you cannot use self.close(True) for both the window and button? or using the Destroy for both?

  • AttributeError: 'bucky' object has no attribute 'closebutton'

    ^ Im getting that error for some reason, cant seem to find out why, code should be identical to the one in the vid, any idea where I might have messed up?

  • Comment removed

  • You havent defined the closebutton function correctly or not at all

    add this inside the bucky class

    def closebutton(self,event): self.Close(True)

  • I am getting that same problem, sometimes mine will make errors even when the code is absolutely perfect

  • @Jiveina i got the same error checked everything no typ faults and still.

    you already found a solution to the problem?

  • Damnn. I just can't learn this wxpython... The previous 44 vids were easy, but now if I try to use these new things on my own, I can't remember absolutely anything of these codes.

  • it works just fine by me

  • Wow, Killed my streak, i did 48 Python tutorials in a row before i got stuck on this one, time to stop working on this one and call it a night. GREAT TUTORIALS! I love all your video's please keep making them.

  • If you can't fix a syntax error

    and you'r this far into the videos,

    don't think you should carry on watching...

    unless you didn't watch the previous 44 vidz

  • Hello Spazm6 , its actually Python 2.6 that has a syntax error for no apparent reason and you then have to rewrite the script again.Python 3.0 fixed this problem

  • the class bucky is not defined

  • it says 'x' is not defined and help me?

  • i got a syntax error on line 9

  • what's a bu-on?lol

  • ty for tutorial!

    awesome

  • so far I have found all of these tutorials to be very helpful. but now I'm having trouble replicating the results. could this have anything to do with my working on Mac OS X instead of Windows?

  • Hello faltru , if you want to work on Windows for your work to be better , download a free program called virtual pc where you can install a Window OS on it and basically having 2 pcs running on one screen.

  • hey can you help me out my computer is telling me my firewall is blocking my idle can you email me any suggestions to help with my problem i would realy appreciate it dude

  • there's a list of programs that firewall appect. you can add python to that list

  • repair the internet connections

  • thanks dude

  • When I'm writing python programs my code is all pretty and different colours at first..then I run it once and thereafter (unless I restart the IDLE) the code is just black. I want the prettiness back :(

    Awesome tutorials as always, thankyou :D

  • Same. Lol.

  • i sleep one night and u have 4 more tutorials UR AWSOME!!!!

  • kewl

  • sweet

  • cool!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more