Right Click Menu Popups With Tkinter - Python Tkinter GUI Tutorial

Поделиться
HTML-код
  • Опубликовано: 15 окт 2024
  • In this video I'll show you how to create a Right-Click menu popup with Tkinter.
    We've looked at regular menu's with Tkinter in the past, but in this video I want to show you how to create a menu that pops up with a right mouse click anywhere on our app.
    We'll do this by creating a normal menu, but not packing it to the screen. Instead we'll create a right click binding that fires an event that uses the tk_popup() function to pop up the menu.

Комментарии • 82

  • @Codemycom
    @Codemycom  4 года назад

    ▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My RUclips Channel:
    bit.ly/2UFLKgj bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
    ▶️ Get The Code
    bit.ly/3fLFQ8p

  • @jesterlw
    @jesterlw 3 года назад +3

    Thanks for the videos man, I have watched near all of them and sometimes even come back to them if I have forgotten something!

    • @Codemycom
      @Codemycom  3 года назад

      Awesome! Glad you're enjoying them!

  • @billielynploof9317
    @billielynploof9317 3 года назад +1

    hello I'm trying to build a start menu and these menus seem to drop down instead of up like the start menu for windows does. Do you know how to get a "drop up" menu with submenues? Do you have a recommendation for a tutorial I could see? Thank you for these videos I think you are the clearest and easiest to follow of all the other youtube instructors I have seen.

  • @creatur
    @creatur 4 года назад

    I usually not comment but always follow your video

    • @Codemycom
      @Codemycom  4 года назад

      Thanks! I appreciate that!

  • @jenilchudgar
    @jenilchudgar 2 года назад

    Great Explanation!

  • @react_meme
    @react_meme 3 года назад

    love ur tkinter tutorials

  • @ameyanand1065
    @ameyanand1065 4 года назад

    Thank You!! Was waiting for this desperately... And was wondering... do you type the code twice, first one to show the output and second one for recording?? And is there a command in tkinter to destroy all windows which are open?

    • @Codemycom
      @Codemycom  4 года назад

      Glad you enjoyed it!

  • @luisperez582
    @luisperez582 Год назад

    Is it possible to modify the default menu pop up you get when right clicking title bar in tkinter. Is it is possible to add another option to that menu bar. This menu bar already has restore, move, size, minimum, maximize and close options

  • @urlanbarros
    @urlanbarros 6 месяцев назад

    Excellent! Thank you.

  • @stefanosstavroulis4887
    @stefanosstavroulis4887 4 года назад

    Great videos! I wonder if it would be possible istead of the menu pop up on when right click could be replaced bya listbox with multiple choises with the same procedure...Thanks a lot!

    • @Codemycom
      @Codemycom  4 года назад

      Give it a try and see

  • @cmputerprgrammer7800
    @cmputerprgrammer7800 4 года назад +3

    Sir, for our image viewing app, Can we make a small frame where the person can drag and drop an image file to view an image.

    • @Codemycom
      @Codemycom  4 года назад

      Sure but i don't discuss that in any video

  • @theinfuber6052
    @theinfuber6052 4 года назад +1

    Coolest tkinter video

  • @tojoeinstein5558
    @tojoeinstein5558 Год назад

    thank you very much... you are very smart

  • @ameyanand1065
    @ameyanand1065 4 года назад

    Hello! Is there an option to open another menu when you hover to a menu? Like in some programs a small triangle facing right will be there and when you hover on it another menu opens

  • @MagicByIzzy
    @MagicByIzzy 4 года назад

    Hey john love ur videos,
    How do u learn all this about tinter? Like where did u get this from?

    • @Codemycom
      @Codemycom  4 года назад

      I've been coding since I was eight years old....

    • @MagicByIzzy
      @MagicByIzzy 4 года назад

      @@Codemycom that's so cool I only discovered coding last yr and I love it! Are u self taught

    • @Codemycom
      @Codemycom  4 года назад

      @@MagicByIzzy yeah, back in 1980 there weren’t many learning resources to speak of ;-p

    • @MagicByIzzy
      @MagicByIzzy 4 года назад

      @@Codemycom 😉 well thanks for the playlist I am sort of self taught

    • @ameyanand1065
      @ameyanand1065 4 года назад

      @@Codemycom i was 12 when I started...

  • @ramehharmouch6245
    @ramehharmouch6245 3 года назад

    how to do an if inside the bind? for example: Button-3 and Button-2. so, how to put the two choices

  • @SamuelLoy
    @SamuelLoy 3 года назад

    trying to add a menu to my appJar program (It's a tkinter wrapper with tkinter compatibility) and it's not working. I'm not sure how to fix it, and I don't want to rewrite my code from scratch in tk, is anyone familiar with appJar? Any reason why this wouldn't work if the "" event was bound to a Tab Frame?

  • @DAX-00
    @DAX-00 3 года назад

    thanks , a didactic video and very useful.

  • @cjli8733
    @cjli8733 2 года назад

    When I wrote this example using my Mac, I found that I had to use instead to get it right.

  • @hillybankok
    @hillybankok 2 года назад

    2:38 I am on Ubuntu (or Linux) and you cannot do root.quit() because then it automatically executes it when you have not yet activated it.

    • @Codemycom
      @Codemycom  2 года назад

      Try it without the ()

  • @moris933
    @moris933 4 года назад

    how to buy curses with coupon code?
    I do not see option like this. Do you have some video ?

    • @Codemycom
      @Codemycom  4 года назад

      Right at the top of the order form on Codemy.com there is a line that says this:
      Do you have a discount code? Click here to enter your discount code.
      Click that to enter your code.

  • @pandipatipavan3804
    @pandipatipavan3804 4 года назад +1

    Please try to add the suitable links which are required for the video.And try to add how to do the Code and Useful things.

    • @Codemycom
      @Codemycom  4 года назад

      What links? Link to the code is in the comment section.

  • @sanskargr9347
    @sanskargr9347 3 года назад

    Can you show me how to do tabes like chrome new tab
    Please 🙏🥺

  • @jonasak4044
    @jonasak4044 Год назад

    Please wanna know how to get the element once it has been selected.

    • @Codemycom
      @Codemycom  Год назад

      I have videos on that, keep watching

  • @devenjain7116
    @devenjain7116 4 года назад

    Hey I'm having some problem with root.destroy() command in python. It doesn't do anything but when I close the python shell, it gives me error that it has already been destroyed. Please help me...

    • @Codemycom
      @Codemycom  4 года назад +1

      Yeah, you will get errors like that using the python shell. Don't use it (why in the world would you?). Use the git-bash.com terminal and sublimetext.com like I do in the videos.

    • @devenjain7116
      @devenjain7116 4 года назад

      @@Codemycom I use REPL and Sublime text only just like you :)

    • @devenjain7116
      @devenjain7116 4 года назад

      @@Codemycom sometimes it works other times it doesn't. I had one question, should destroy command come afer mainloop has been closed or before?

    • @Codemycom
      @Codemycom  4 года назад

      @@devenjain7116 Everything comes before mainloop. root.mainloop() is always the last thing in your code

  • @Skfiehab
    @Skfiehab 4 года назад

    Tnx a ton

  • @grahampawar
    @grahampawar 4 года назад +1

    How to add Cut, copy and paste to right click menu?

    • @Codemycom
      @Codemycom  4 года назад +1

      I discuss that in the text editor series of videos on this playlist

  • @akilasivakumar1081
    @akilasivakumar1081 4 года назад

    i like your videos :)

  • @huylong4328
    @huylong4328 4 года назад

    I want to convert my voice to text and display it on tkinter, but I want when I say a new word it will automatically replace the old word, this is really hard for me, please help me, thanks.

    • @Codemycom
      @Codemycom  4 года назад +1

      Sorry, I don't have any videos on that, but you can always update a label with .config(text=new_text)

    • @huylong4328
      @huylong4328 4 года назад

      @@Codemycom that's ok, thank you

  • @akilasivakumar1081
    @akilasivakumar1081 4 года назад

    super video

  • @Love_Coding
    @Love_Coding 4 года назад

    where can i purchase your tkinter books

    • @Codemycom
      @Codemycom  4 года назад

      I don't yet have a tkinter book

    • @billielynploof9317
      @billielynploof9317 3 года назад

      @@Codemycom I would love a tkinter book that sounds amazing. an ebook format would be easier for me because of my eyesight should you wish to someday write one.... Your classes are really helpful.

    • @Codemycom
      @Codemycom  3 года назад

      @@billielynploof9317 Thanks, I'm working on one

  • @thatalloguyoverthere4076
    @thatalloguyoverthere4076 4 года назад

    plsss do a video about openGL in tkinter

  • @rishisid
    @rishisid 4 года назад

    every time first not matters
    but second do matters

  • @cmputerprgrammer7800
    @cmputerprgrammer7800 4 года назад +1

    First view!!!

    • @shaunakn5881
      @shaunakn5881 4 года назад +1

      I am first lol

    • @Codemycom
      @Codemycom  4 года назад +4

      @@shaunakn5881 Actually technically I'm first ;-)

    • @shaunakn5881
      @shaunakn5881 4 года назад

      @@Codemycom yes sir XD

  • @shaunakn5881
    @shaunakn5881 4 года назад +1

    FiRsT