Dropdown Menus With TKinter - Python Tkinter GUI Tutorial #18

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2024

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

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

    ▶️ 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

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

      can you make a video like how to make a dependent dropdown list

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

      @@ezana7401 what are you talking about?

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

      i know it's kinda randomly asking but does anyone know of a good place to stream new movies online?

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

      How can I change a label or buttons font in real time based on the current optionmenus selection (current users selection) (while scrolling through font drop down list)

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

      @@Postulatedstate use .config() whenever you want to change anything in real time...I have many videos showing it's use.

  • @samukaze5810
    @samukaze5810 2 месяца назад +1

    You've literally helped me through learning Tkinter for the past 3 years. You are very helpful and you explain things well! I couldn't have made any Tkinter GUI without you!

    • @Codemycom
      @Codemycom  2 месяца назад +1

      happy to hear it!

  • @tillebeling8359
    @tillebeling8359 2 года назад +2

    I'm working the first time with Tkinter and Python to create a GUI for a project and your tutorials are a great help! Love it!

  • @thesun3267
    @thesun3267 3 года назад +8

    You have helped me a lot in my Computer Science project and i am pretty sure i wont forget Tkinter even after this project's done. Thanks a ton :)

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

      Thanks for watching!

  • @ninjatribble7961
    @ninjatribble7961 4 года назад +14

    Another great vid. Thought I'd just leave a comment to help with YT algorithm?

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

      Thanks! Every little bit helps ;-)

  • @Ascannio
    @Ascannio 5 лет назад +5

    Excellent set of Tkinter GUI tutorial videos. I am enjoying easy and relaxed form of lessons with a bit of humour. Well done!
    Just wondering why so small number of the views. Under rated, for sure.

  • @tudorcozma6781
    @tudorcozma6781 5 лет назад +5

    Thanks for the lessons
    :) I had problems with the * I didn't know about that

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

    you are a great person. I have no doubts as little to little things are solved by your videos. Hatsoff Dear!

  • @enricogalli8736
    @enricogalli8736 4 года назад +12

    You always scare me when you say "What's going on ..." :D

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

      lol you're pretty excitable then lol

  • @safwankhan199
    @safwankhan199 2 года назад +1

    out of curiosity, which videos prior to this one in ur playlist talk about (in depth/remotely) about string var. it seems to be quite an interesting concept and would like to better understand it
    btw, great videos man. keep it up with ur channel :)

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

      I don't think any...it's really not interesting at all. I think you're overthinking it.

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

    What a journey this was, I learnt a lot!

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

    Is it possible to run a function each time the menu is updated? (Whenever a user selects something from a menu a function is called)
    edit: Nevermind figured it out. To achieve this you can simply add the command attribute to the option menu.
    When ever the drop down is interacted with it will call the function parsing in the selected value.
    dropdown = OptionMenu(root, selected_item, *items_list, command=display_selection)
    def display_selection(selected_item):
    print(selected_item)

  • @dxdon1000
    @dxdon1000 3 года назад +2

    how would I assign a value for example Monday as 2 so when you select Monday

  • @cameronmclaughlin8024
    @cameronmclaughlin8024 Год назад +1

    I'm not sure how RUclips handles this stuff but I think it's a little ridiculous I need to express that I like each individual video (well deserved on your part and I have been because you deserve it) instead of liking the playlist as sort of a catch all(or like all) for the content you're providing. I find this to be especially true on educational content where it's typically consecutive videos around a very broad topic. You shouldn't lose value because you're an educational channel, assuming you do based on what I know of RUclips. Just my unsolicited 2 cents.

  • @CrownCatX
    @CrownCatX 4 года назад +2

    how do you change that little white box thingy next to the dropdown text?

  • @matthewkyi159
    @matthewkyi159 4 года назад +5

    Hey, great video, but in my gui, I can see all of the items when i click the dropdown, but when I select one, it doesn't display the text for it.

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

      Check your code for errors

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

      Got same issue

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

    Thanks for the videos, really great! Just a beginner question: can I limit the selection to just one and add an "OK" button to close the menu once selection finished? Thank you!

  • @Damieru
    @Damieru 2 месяца назад

    In the show() function you're using a variable (clicked) which is defined outside of it. Isn't there a way around this?

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

    @6:08, you added "Saturday". How would I add a new date via an input box and subsequently update the list/optionMenu to show the newest addition?

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

    Love this video! I used this concept to create a workout app. Is there anyway I can make the selected word from the dropdown menu output something else? So if I click "Monday", it would output a to-do list for Monday

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

      Sure, I have videos on that on the playlist

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

    This course is more than 2 years old and its still great... I couldnt find the place to get all your courses.. if you see this message please send me some instructions coz I really wanna get your tkinter course.. specially those about tkinter with database

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

      lol every video mentions codemy.com

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

    Amazing tutorial

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

    Thanks for this super helpful video! I was wondering if there is a way to add a feature where the user can search through the drop down menu options?

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

      Sure, you know what items are in the menu...so you can search it in any way you want. There's no built in feature, but you could code it up fairly easily in the same way you would search any list in python.

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

    Is it possible to create arrows linking to other options in dropdown menus?

  • @BellyLaughQuotes
    @BellyLaughQuotes 5 лет назад +2

    How do you do a dependent drop down list? For instant, I have 2 drop down lists, one is country and the other is city, if user select USA the other drop down box would automatically have a list of all the US big cities. Can you do a video of the topic? Thanks.

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

    Could I set a drop down menu option to open another dropdown menu on the submission? (1st menu :What direction are you going? submit "towards city" and once that is submitted through the click, a second dropdown menu opens "Where would you like to go in the city?"

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

      Sure, I have videos on dependent drop downs on the playlist

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

    I love you for making these videos

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

      Thanks! Glad you like them

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

    Great training and easy to follow video thanks.
    i know this is an older video but im after a bit of guidance. I have multiple optionmenus and im trying to have it so only the first is active and the rest are disabled till the corresponding optinmenu has been answered is this possible?

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

      you can .configure() any widget and set the state to disabled.

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

    Great explaination

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

    thanks sir for amazing tutorial🎉❤

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

    how would you change the the coordinates i tried clicked.grid and place(x=y=) but tbtat didnt work

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

    Thanks for the tutorial, very helpful!!
    However, I have a problem. What if I want to add more option into the option list of the dropdown menu while running the application? How can I do that?
    Please help me! Thanks very much

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

      I don't know off hand how to do that, you'll have to hack around and figure it out :-)

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

      Did you find out how?
      With the list I added a button that opens another window where I add it to the list, the thing is that once that window is closed I don't get the updated list on my original window. Any thoughts?
      def AddDays():
      AddDaysWindow = Toplevel()
      newDay = Entry(AddDaysWindow)
      newDay.pack()
      newDay.insert(0,'Add a day')
      def clicked():
      WeekDays.append(newDay.get())
      Label(AddDaysWindow, text=WeekDays).pack()
      AdddayBtn = Button(AddDaysWindow,text='add a day',command=clicked)
      AdddayBtn.pack()
      Button(AddDaysWindow, text='close',command=AddDaysWindow.destroy).pack()
      DaysMenu = OptionMenu(root,ChosenDay,*WeekDays).pack()
      AddBtn = Button(root,text='Add days',command=AddDays).pack()
      ChosenDayBtn = Button(root,text='Day Chosen',command=UpdateDay).pack()
      Im stuck here but searching for the answer.
      Thanks John.

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

      ​@@wrongloop For e.g. I am taking John's program.
      -First you create a textbox
      -Next you wanna create a button named add or whatever.
      -Next you define a function for that button which takes the value in the textbox by using e.get() then add that to the list using the .append() or .insert() function.
      Hope this helped.

  • @codewithwasif3517
    @codewithwasif3517 5 лет назад +2

    This Worked, Thanks You :)

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

    Great video ..Is it possible to populate one combobox based on selection of other combobox using tkinter?

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

    Very useful, thanks!!

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

    Thanks for the videos! Realy usesfulls

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

    hello, how are u? hey can u help me? i need to disable a textbox with a checkbox, this is possible?

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

    Is it possible to enable scrollbar for long dropdown (I mean having multiple distinct dropdown). Any lead will be appreciated.

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

    excellent video.
    Instead of having a list with "Monday", "Tuesday". "Wednesday". etc I have a list with integers 1 to 8.
    I need to create X entry widgets (X being the integer value selected in the OptionMenu).
    Can this be done?

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

      give it a try and see :-p

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

    How can I use the value selected by the drop down as an input into other functions? Like printing option out on console and not just TK..

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

      by passing it into any function like you would pass anything into any function

  • @jays-place
    @jays-place Год назад

    how can i deactivate the dropdownmenu whilst the script is running? i want to have a "Submit Answer"-Button, that makes it, so that after clicking it you can´t choose something else from the menu, but i am new to programming, so i have no idea how that works. Help would be appreciated :)

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

    Hey John Elder!!
    I wanted to ask that how can i set a range in the drop box
    Suppose that i have to make a Dropbox for the no. Of days in a month.
    Then how i can i set a range from 1 to 31?

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

      use pythons range function in a for loop

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

    In python's tkinter module. Does OptionMenu not have a font= argument?

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

    very helpful for making hack client drop down menu

  • @eac1776
    @eac1776 3 месяца назад

    Yo any reason its throwing me an error when i try to change the OptionMenu thing? im trying to have multiple dropboxes each that hold different value but when i change on all 4 change so i tried seperating them because they were all under OptionMenu i then tried to make 4 seperate lists with different names but still no luck

    • @Codemycom
      @Codemycom  3 месяца назад

      probably have some error in your code, but I can't guess what

    • @eac1776
      @eac1776 3 месяца назад

      @@Codemycom Fair yeah thanks for the attempt tho ill just post on stackoverflow

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

    Hi, thank you very much for your video.

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

    good tutorial, can you do a follow-up on ripped pecs ?

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

      Ha! Actually I just got back from the gym and it WAS chest day LOL

  • @rishia.r
    @rishia.r 2 года назад

    how to create a dropdown with a dropdown..........and just consider that if there is 4 values in the subdropdown ......if i click on one of that value i need to display that value in the main display box

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

    Thanks! im making a settings menu that lets me set colors for my app, and i was trying to idiot proof it

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

    Really helpful
    Thx

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

      Thanks for watching!

  • @Adrian-mh8op
    @Adrian-mh8op 2 года назад

    I have a few questions. I’m making a flashcard project, I followed your tutorial for the language one but to take it further I want to use SQLite to store the words. I’ve already created my table how do I call the contents for it to be displayed on the GUI of the flashcard.
    Also I have a menu but when I click between the menu the contents of it gradually go further and further down. How do I make it stay stationary when I switch between the menu items

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

      I have videos on all that stuff on the playlist

  • @MdFahmidBinMostafa-
    @MdFahmidBinMostafa- Год назад

    What's the main difference between OptionMenu and Combobox?

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

    Could you please add videos for dependent drop-down box for Car brand, colour, model, prize

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

    IM SORRY IM LATE TO CLASS BUT IM HERE

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

    Thanks man!

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

    Do you know how I can change the background color of the Dropdown menu? But I don't mean the background you see if you click on it. I mean the color of the background which you see if the menu is closed or an item is chosen.

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

      I don't believe you can easily change that because the operating system determines those colors.

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

      @@Codemycom thanks for the answer! but too bad, because the default grey looks not really nice

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

    would anyone know how to store a specific string or float number in a selection in the list and then display that??

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

    Hi, I tried out this program. I have a program and the dropdown box appears on another window. I want it to appear on the same window. But the rest is working out perfectly, is there any answer to this?

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

      Why does it appear on another window, I don’t know what you mean.

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

    just for that simple pulldown menu we need so many lines of codes?
    personally speaking, it is surely not RAD.. (rapid app development).

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

      You think less than a dozen lines of code disqualifies something as being rapid? lol I think you misunderstand something about coding.

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

    How to enable scroll view within a dropdown box sir

  • @naz-kh6lj
    @naz-kh6lj 4 года назад

    do you know how to extract the other data for option menu? for example, the column name in excel file will be the option menu.

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

      sure

    • @naz-kh6lj
      @naz-kh6lj 4 года назад

      @@Codemycom how can i contact u?

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

      @@naz-kh6lj You are talking to me right now

    • @naz-kh6lj
      @naz-kh6lj 4 года назад

      @@Codemycom can i get ur email?

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

      @@naz-kh6lj There's a contact form on codemy.com that goes to me, but I don't do individual consulting or coaching

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

    Hello sir, Is it not possible to get the value of a dropdown without using a button ? Actually my main intention is when user select lets say Monday then a label below it should automatically display lets say 100 . If user selects tuesday the label below it should display 200 and so on

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

      I want this functionality without having to use a button which you used in this video tutorial. Kindly you or anyone else who knows the answer help me

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

      Yes you can, using event bindings...I'll discuss it in a video soon.

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

      @@Codemycom Thank you very much sir. Looking forward to that video. Please make it as soon as possible. Thanks a lot in advance

  • @akshaybalaji.s1912
    @akshaybalaji.s1912 2 года назад

    what should i do if i want the selection to call our a function?

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

    Sir can I change the font style of drop down box????
    If we can so how ????

  • @Paul-ly1pw
    @Paul-ly1pw 2 года назад

    When the window closes the selection disappears. Is there a way to store the selection on the optionmenu, maybe with a 'save & close' button so when the GUI is opened back up the selections are all still there? Then the selections can be cleared from a 'clear' button when the user is finished with their selections.

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

      Sure, I have videos on the playlist about saving things

    • @Paul-ly1pw
      @Paul-ly1pw 2 года назад

      @@Codemycom I’m creating a rota in Tkinter with multiple option menus. To make the code cleaner I have the option menus in a separate file in a function.
      The option menu takes from a list that is in another file. On clicking save & close, the entries are stored so when the program is loaded back up the option menus are preloaded with the previous choice. I will then create a clear button to clear the preloading when the user is finished with it.
      I was thinking of assigning a command to the option menu which goes to a function. The function gets the value and assigns it to a list at a certain position.
      Then on loading the program, it checks that position and if it’s not empty then set the option menu as that value (might be down a dictionary route I guess)
      The problem I have is it’s getting too complicated for me and it isn’t working. Also, because the code is in separate files, I cannot reference a variable that is in a function in another file, and I don’t know why.

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

      @@Paul-ly1pw I'd put all the code in the same file and work backwards from there

    • @Paul-ly1pw
      @Paul-ly1pw 2 года назад

      @@Codemycom I’ve put them all back into the same file as that frame but cannot work out how to save the users selections for the various combo boxes.
      I’m thinking I need a txt file and use a dictionary so the key is the combo box and the value is either what they selected/entered, otherwise it defaults to None.
      To read the file, I believe I need either json, ast or pickle (from what I’ve read)
      I don’t know how to set the combo box to display the value that’s in the key, that’s in the file. Once I’ve worked that out, I guess the save option will be easier.
      To save, create a loop where it goes through each combo box and copies the value that’s in it to the corresponding key in the file.
      I just don’t know how I go about making all these links. Unless there’s an easier way of doing it?

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

      @@Paul-ly1pw You'll just have to play around with your specific needs and discover what works best.

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

    Thank you

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

    Thanks

  • @briandw5416
    @briandw5416 5 лет назад

    Is it possible in tKinter to populate the Dropbox with info from a DB? If so can it act like a key:value pair? Say item description (from DB column) is key and value is price(second column in DB) so price can be stored as a variable in a calculation i.e. price * quantity, quantity would be from an entry box or dopbox

    • @Codemycom
      @Codemycom  5 лет назад

      sure

    • @briandw5416
      @briandw5416 5 лет назад +1

      @@Codemycom cool will tinker with it on mine own first

    • @Codemycom
      @Codemycom  5 лет назад

      @@briandw5416 have fun!

    • @briandw5416
      @briandw5416 5 лет назад

      @@Codemycom you know I'm not shy bout asking questions lol

    • @briandw5416
      @briandw5416 5 лет назад

      if i want say 5 drop downs on one window i know i would have to make like drop_down_1,drop_down_2 etc so they would populate separately but in the SQL to pull the info i would just need one variable,correct? each drop_down will pull from it separately?

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

    can we bind a optionmenu with another optionmenu

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

      Give it a try and see :-p

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

    Out of interest, can you do this with self instead of root, so that it can be used within a specific frame?

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

      Sure...give it a try and see :-p

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

      @@Codemycom So, I gave it a shot and it does actually works which means you can use it within a frame. Thanks for the help!

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

      @@scarletdesorgher6378 Sure thing!

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

    Sir I have a question how to use array as an option instead list.

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

      in python arrays are called lists...a list is an array

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

      @@Codemycom oh my... Thank you Sir. Great help. More power to your channel Sir. Thank you very much for your response.

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

      @@micosanpablo5391 sure thing

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

    Hi, I have 5 dropdown lists, each with 20 options, whenever I click the bottom two, they always come out from outside of the window? Is it because I got too many options?

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

      make the window bigger?

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

    Thanks a lot

  • @JAY-REMITRA
    @JAY-REMITRA 2 года назад

    We just started our first project in class and I wanna use this dropdown but Im having problems because it doesn't appear and that PIL is not defined. we were only taught about import messagebox

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

      you have to pip install Pillow on your terminal

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

    why does clicked.get()).pack() have 2 closing parentheses?

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

      because .pack() needs to be outside the function that defined the thing.

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

    Hi!
    How to add scrollbar in drop-down.

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

      Hm, never tried that. If you have so many options in your dropdown that you need a scrollbar, you're designing your app poorly.

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

    So if I want a specific window say window A to open up when a user chooses an option from the drop down menu, and a window say window B to open up when a user chooses another option, how do I achieve that?

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

      In the function the runs when a person clicks the menu item...write code to open another window. I have a few videos on opening other windows in the playlist.

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

    Option [0] and *option should be concern.

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

    Can we make button and drop down in a label

  • @darkwing4027
    @darkwing4027 9 месяцев назад

    Hopefully someone can help me with this. I created a drop down menu but now I want to convert it to buttons on the window. It seems no matter what i do it doesn't work properly if anyone can help me that'll be great. I am using pygame because its a quiz game and the options are categories for the game.

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

    how to move position of dropdpwn???

  • @Abdulaziz-e-2030
    @Abdulaziz-e-2030 4 года назад

    hello teacher
    I installed PIL library but when I write it error says
    from Pillow import *
    ModuleNotFoundError: No module named 'Pillow'
    pls your help

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

      Some people have problems with this...you'll have to google the error

    • @Abdulaziz-e-2030
      @Abdulaziz-e-2030 4 года назад

      @@Codemycom oook thank you

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

      Uninstall Pillow and Python. Install an older version of Python, then install Pillow again. If I remember correctly, this is how I solved the same issue.

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

      @@oncdastan9947 interesting

    • @Abdulaziz-e-2030
      @Abdulaziz-e-2030 4 года назад

      @@oncdastan9947 i will check.. Thanks

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

    I have made a drop down list in a function , which i call in main window but i can't seem to select the option listed in the list ...
    It worked perfectly when i run it separately..

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

      Hm...

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

      @@Codemycom any idea.. it doesn't show any error or anything..

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

      @@Dr_R3d without seeing your code I couldn't guess

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

      @@Codemycom
      from tkinter import*
      from tmp1 import idc
      #Main Window
      win1 = Tk()
      win1.title("Registration")
      win1.geometry("400x200")
      win1.configure(bg="#FFFFFF")
      id_card = Button(win1,text="ID-Card",command=idc)
      id_card.pack()
      win1.mainloop()
      ******************************************************************
      from tkinter import*
      #called function
      def idc():
      win2 = Tk()
      win2.title("ID-Card Resgistration")
      win2.geometry("400x200")
      win2.configure(bg="#F7E1F9")
      A = StringVar()
      opt1 = [
      "First Year",
      "Second Year",
      "Third Year"
      ]
      lst = OptionMenu(win2,A,*opt1)
      lst.pack()

      win2.mainloop()

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

      @@Codemycom I have remove other lines of code keep the one that is troubling...

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

    does anybody knows if dropdown menus can be enabled/disabled? I am looking everywhere, but can't find the solution.

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

      Sure, set the state="disabled" or state="active" or state="normal"

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

    Great! Very very helpfull. Gracias totales amigos

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

    I got the error:
    ModuleNotFoundError: No module named 'tKinter'
    I've changed it back to "tkinter" but it still says "tKinter" in the error.

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

    Does anyone know why this won't work with grid instead of pack

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

      It will work with grid just fine. You're just doing something wrong.

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

    Hii...it's not showing the option i select...what should I do

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

      Review your code, compare it to mine, determine what you typed incorrectly.

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

    How can i populate a drop down list based on entering a word into an entry and submitting

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

      I have a video that sort of covers that in my tKinter playlist...

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

      @@Codemycom Thanks, which video?

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

      @@end2399 I don't remember...the crm vids towards the end of the list maybe

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

      Codemy.com Ok thank you

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

    please help me, how can i populate OptionMenu() with sql server database
    .

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

      Check the playlist

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

      link would be helpful.

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

      Please Sir I really need your help i am making a simple window for "'Sales on Credit" everything works perfectly but whenever i fetch data from my SQL server database even datas are shown but in different format like('Example',) but rather i want it to be in String like Example with no brackets so that whenever any purchase is done in credit than optionmenu would show me acoount holders name from database and purchase is done in their account and insert that transaction in different table with their account name,Item name, and amount.

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

      @@PapasooH the playlist link is in the pinned comment right here.

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

      @@Codemycom sorry Sir. but is there any specific title of the video ?

  • @AmitPatel-cl6ou
    @AmitPatel-cl6ou Год назад

    Keep font size large, can't read on mobile phone

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

    has anyone gotten the error "TclError: no display name and no $DISPLAY environment variable" when they try to run this? not sure how to fix

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

    I have a doubt
    How can we change the place of this drop down list

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

      don't know what you mean

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

      @@Codemycom i mean to say if i want to change the position of drop down list like to move it right or left what should i do

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

      @@divyanshipati7432 use the grid system to put it anywhere you want

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

      @@Codemycom i used the grid system and alsoni used padx and pady its not working if possible can u make a video on that

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

      @@divyanshipati7432 you just have a typo in your code. I use the grid in many videos on this playlist.

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

    Hi It is giving me a module not find error on PIL

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

      That happens to some people...you'll have to google it and try a bunch of things until one of them works.

  • @kanishkakumarasiri9257
    @kanishkakumarasiri9257 5 лет назад

    How to make this as a searchable drop-down list?

    • @Codemycom
      @Codemycom  5 лет назад

      Not sure what you mean...

    • @kanishkakumarasiri9257
      @kanishkakumarasiri9257 5 лет назад

      @@Codemycom oh, I mean, imagine there is a drop-down list with multiple values and wanna select a specific value among those values, how to select that value in this dropdown list without scrolling

    • @Codemycom
      @Codemycom  5 лет назад

      @@kanishkakumarasiri9257 still don't get it...doesn't this video show you exactly that?

    • @kanishkakumarasiri9257
      @kanishkakumarasiri9257 5 лет назад

      @@Codemycom oh , let me explain you, imagine there is a drop-down with 100s of records how can we get the value we want within a moment?

    • @Codemycom
      @Codemycom  5 лет назад

      @@kanishkakumarasiri9257 if you have a menu with hundreds of records, you're just going to have to scroll through them all...

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

    Code is wrong all I get it
    TypeError: 'str' object is not callable

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

      Code it not wrong, as proven completely in this video. You typed something wrong.

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

    Wow

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

    Could I put a Calendar inside a dropdown menu? I want to have field where a user can pick a date on a calendar. I have a calendar but it ruins the structure of my grid so I was wondering if I could put it in a menu, so the grid isn't shifted