Binding Dropdown Menus and Combo Boxes - Python Tkinter GUI Tutorial #45

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

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

  • @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

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

    I can't explain how I had not found this channel before. New subscriber.

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

    Hey, just want to say thanks for this excellent video! Your explanations are awesome.
    Including a use case of how to add logic to a combo box helped me a lot! Keep up the awesome content.

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

    You are a great prof...specifiquely your smail...thanks from morocco in north afriqua

  • @chendian-jing6037
    @chendian-jing6037 2 года назад

    Supper great video. I extended your example codes to my company project to develop strategies to industrial problems. I really appreciate your help.

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

      Glad you found it helpful!

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

    Now, here's the thing - I make useful applications for people to interface with, such as quiz tables for self-assessment respecting climate change. The sort of thing whereby you open a box, select a button; and that loops to another issue through combi dropdowns - all old fashioned I guess. Why? because human life is complex when taking in account all of the intricate paths and foibles we possess. People like 'buttons' and 'boxes' as they wish to open the combi box; it is intuitive to them. Whereby, they select an option and scroll on through to another set of questions; and so on ... If a box appears, that imprints into their minds better - the lesson of 'what they are responsible for through their actions' registers. The point I am making is that although this is an excellent tutorial video, you appear to be a 'coder' rather than a 'programmer'. To me the difference is huge. One provides the code, the other is more philosophical through knowing what to design code for - the end product's purpose. I would have liked this video more if it had buttons designed into the GUI. Nonetheless, I have subscribed to your channel.

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

      well the name of the channel is codemy.com...so yeah, I focus on coding.

  • @good-gpt2-chatbot
    @good-gpt2-chatbot 3 года назад +3

    Thank you very much sir, I can't explain how much you've helped me!

  • @kapibara2440
    @kapibara2440 5 месяцев назад

    Great work from John! Thank you 😊

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

    thank you very much!! already watched over 15 episodes which I really needed for the chat program i'm currently working on!

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

      Glad you found them useful!

  • @DanielSilva-fv8br
    @DanielSilva-fv8br 4 года назад +1

    Great video! I've been trying to bind a combobox for like 1 hour. Thank you.

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

    Thank you very much for the smooth content and your great humor.

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

    I love your videos man! Thank You so much! I am currently working on a project like most people here and I have a question: I have a dropdown menu with a list of numbers from 1 to 10 and I want my customer to be able to fill the dropdown menu just by clicking on the keyboard number.
    I would really appreciate it if you could help me with this.
    Thank You!

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

    Hi John, thanks for this tutorial. May I know how to display the output in just one line instead of showing everything you've selected? So if I choose Monday, it will display Monday and if Tuesday, the result from Monday will be replaced by Tuesday and will not create rows of what I've selected?
    Also, can I create a button out of what I'd selected and linked to open a file? Thank you!

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

      Once you select a thing, you can do whatever you want with it. To learn how to use labels and buttons, check the playlist for their basic usage

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

      Hey, friend. Have you found the solution to your issue? I'm having the same issue right now and it would help me a lot. Thank you!

  • @charliefoo7581
    @charliefoo7581 4 года назад +6

    Thank you for the Tkinter videos. I have a quick question: Is it possible to get the list position of the user selection instead of the text itself?

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

      Sure, likely in the normal way you would find a list position...right? Play around with it...

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

      just use index function to find the position using the text.

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

    Feed the algorithm! Great vid

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

    Great Tutorial. I have a question about combo: is a way to let open the combo after click? I want show a long item list even after the click...

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

      Not sure exactly what you mean

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

      @@Codemycom sorry for late, I have asked a banality. The behaviour of combo is exactly what I want... 🤦🏻‍♂️

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

      @@denniszignin7745 I don't know what any of those words together mean...

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

    Hi, Thanks for the tutorial.
    Can I make the scrollbar in the combobox at the left side. I am writing in combobox values in Arabic so when i choose a value from dropdown like ' I like your tutotial'. It implemented as 'tutorial your like I'.

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

      Yeah you can do that with .grid() instead of .pack

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

    Thank you, great videp!
    One question, could you please show how to create a multiple select combobox with drop down ?

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

      I think I've already done a video about that on the playlist

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

    hi
    Thanks for this excellent video.
    I have a litle problem here, when i select a value from a combox, the value selected is not showing immediatly in the box, it waits until the main action of the program finished, can you help me to solve this problem.
    Cdlt

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

    Thank you very much for your tkinter videos. Could you guide , is there any option for autofill the combobox list

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

      Not without hacking together something

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

    Nice tuto ! But i have a question. How change the color of the text after you selected it ? (not change the selectbackground but the text itself) of the combobox ?

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

    sir, thank you for your video. but in combobox we press a letter the cursor cant go that word. what can i do?

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

    Yey! Finally I found a great tutorial 😍 Thanks!

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

    I'd like to see how to do this where the options are the results of a function. So if I'm pulling employee names from file names with a function getEmployeeName, how do I assign the output of that function to the Options for the drop down. As you've shown here, its not very flexible. I need to be able to have the options change according to the files selected.

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

    Thanks a lot for this video sir. Keep making videos on tkinter as I am learning to develop app watching your videos.

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

      Glad you're enjoying them!

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

    Hi John. Loving your videos! One aspect of my app that I am struggling with is that I have around 6 different comboboxes. 1 combobox is the 'master' whereby whatever value is selected from the list, will make 1 or 2 comboboxes (depending which ones are relevant) appear. Each time you select a different value from this 1 combobox, the linked comboxes are hidden/shown. I am trying to use a bind on the 'master' combobox and then in that function, create multiple 'if' statements to link the other comboxes to the relevant value in the 'master' combobox. I am trying to add a .destroy() in this function so that the non-related comboboxes are hidden but it doesn't really seem to be working. Is there a better way to do this? Hope I have explained my issue ok!

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

      If you destroy a thing, it's gone for good...you likely don't want to do that. You can just hide it with pack_forget() and reshow it again with pack()

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

      @@Codemycom Hi John, thanks for your reply! I am using grid() on the widgets and I actually found that grid_remove() seems to do what I need. What is the main difference between grid_forget() and grid_remove()?

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

    can we use combobox without defining options ? e.g. option=list(np.sort(wf['raw data column header'].unique ?

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

    It clears my doubt. Thank You !

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

    hello. thank you for the video. but i have a doubt, i want a function to be executed for no matter what the selected option from the combobox. i guess i have to use for loop but i am having trouble how to do it. please shred some knowledge in this regard

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

    Hi John, can we jump to a particular spot of the dropdown list instead of scrolling all the way down? Say by clicking "S" on the keyboard which then send us to "Saturday"?

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

      You might be able to do that with binding..but I’ve never tried it.

  • @NotEnoughTime-cf2pi
    @NotEnoughTime-cf2pi 5 месяцев назад

    Is there any way to nest a list box in a combobox. I need a multiselect option?

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

    can you do a video on updating the dropdown when u add to options?

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

      hey, been a while but have you had any luck? i need help with this

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

    How can we put to combo box default value?
    like("MONTH")
    But it should not be on my list.

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

    Hi, 1st of all, you are doing an amazing job,
    I want to knw hw to change font/Size of options of the combobox, n can i set it to Readonly, whats syntax for that?
    Also how to change font/size of whatever we are displaying through
    myLabel = Label(root, text= " ")

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

      Let me answer at least your first question. To make the combobox read-only, you should include inside its definition an option called 'state', and set that equal to 'readonly'. So here is the syntax:
      myBox=ttk.Combobox(root, state='readonly', font=(' ',15),...and so on). That should make the combobox read-only. The way I defined the font here will adjust the size of the selection inside the combo box, but not its drop down menu. So you will notice that the size of the drop-down menu itself will not change. I discovered a way to tackle that, but it's too complicated to describe here. If you have solved that problem and an easier solution please share it with us.

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

    Very interesting.. Thank you!
    I hope that you're gonna make more tutorials in that ttk module :-)

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

      Probably so :-p

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

      yeah bro,
      there are very few videos on youtube who teach ttk very well

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

      @@tonystark2358 for sure

  • @ab123-j7v
    @ab123-j7v 2 года назад

    great video, thank you, you are a genius.

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

    Amazing videos and simple .Thank you man

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

    great vid, any plans to do anything on Kivy

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

    Thankyou for the code, I have a doubt like after passing a value through ComboSelected to a function I need that value to be passed to another function - which is working through another button??how could I make that possible??

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

      Call the other function from inside the first function, passing whatever along inside it: second_function(pass_a_thing)

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

    Thank you Mr. White!

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

    this was extremely helpful
    thank you sir

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

    Do you have a video on how to clear the selected values in combo box and text widgets after you've sent those values to a database or searched for them, etc.?

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

    Can we use if else in function checking the clicked check box is eight Or wrong

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

    HI, great videos. I have a combobox which then has a dependent listbox that brings up several option based on the drop down value. i was able to do it by using another of your tutorial, it is really cool, and I would not have been able to do it just by reading the descriptions. I also want to display the value of the drop down as you show in this video, and I have that working. The issue I am having is getting both of the functions working when in the binding, only the last function listed works. I tried two separate functions, still only the last one works, I tried using comma or "And" between the two, but still only the last function called will work. my_combo.bind("", display, parks_listbox) - here is a universal version of my bind code. Any ideas?

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

      i figures it out, just write a new function or set them = True.

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

    Hi Codemy. Thank you for sharing this content. You've helped me (20210324 20:06pm brazil)

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

    how would i do if my project is about font size and font style using combobox (my whole project is about text formatting with sample)

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

    how would you return the option selected to a variable? Not inside of the window, but just store the selection into a variable in the code.

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

      In the same way you create any variable ever. variable_name = clicked.get()

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

    hello, thanks a lot for your video it is very helpful, I would like to ask you a question,
    actually I have almost the same code as yours :
    combobox=ttk.Combobox(toplevel,values=listebox,width=75)
    combobox.grid(row=nb_row,column=1)
    combobox.bind("",action)
    and the action function is :
    def action(event):
    print(combobox.get())
    but when I run it it says that combobox is not defined, could you help me please ?

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

      try naming it something other than combobox

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

    Sir, can we give any background color for combobox?

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

      root = tk.Tk()
      combostyle = ttk.Style()
      combostyle.theme_create('combostyle', parent='alt',
      settings = {'TCombobox':
      {'configure':
      {'selectbackground': 'blue',
      'fieldbackground': 'red',
      'background': 'green'
      }}}
      )
      # ATTENTION: this applies the new style 'combostyle' to all ttk.Combobox
      combostyle.theme_use('combostyle')
      # show the current styles
      # print(combostyle.theme_names())
      combo = ttk.Combobox(root, values=['1', '2', '3'])
      combo['state'] = 'readonly'
      combo.pack()
      entry = tk.Entry(root)
      entry.pack()
      root.mainloop()
      Taken from Stackoverflow.com

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

      @@hishamashour5771 Thank you so much

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

      @@rakeshshankar2154 Most Welcome!

  • @ArunYadav-ke2nu
    @ArunYadav-ke2nu 11 месяцев назад

    How to make a dropdown box that is scrollable and shows 5 elements at once and have nearly 60 elements?
    Please Help

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

    how do you make previously picked list outcome to hide, after picking the next item from the list?? 6:18

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

    how can i use de variable returned from comboclick in other function? thanks

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

      Depends on how you want to do that

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

    Thank you Mr 🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

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

      You are very welcome

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

    Best videos

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

    sir i need a help in combobox. when i type the first letter so it shows all the items in combobox related to the similar first letter. plzz help me out sir

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

    John, how can I use the value selected on a Combobox in another function?
    I have tried to use a return type and make a variable global but still getting errors

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

      In the same way you pass anything to a function

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

    Can we attached it in CSV/XML row ? I need a drop-down list attached with CSV and then want to access in HTML. is it possible. Pls pls explain

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

      Yes it's possible, you'll have to figure it out yourself tho.

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

    Can i call this from toplevel it shows that top is not defined

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

    Thanks!

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

    Hi sir , I have one question.
    You must have seen in websites where there is a little icon adjacent to a text box which has a calendar icon on which we can click to select our date, month and year. How to do that in tkinter?

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

      If it is not possible (calendar icon) then how to take date as a user input in tkinter ?

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

      @@sujitsingh7279 I'm not sure what you mean about the calendar icon...

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

      @@Codemycom sir I just found the exact word on internet. Actually it's called date picker. So when we want someone to enter a date we provide them an icon where a user clicks and he/she chooses the date, month and year and once a user selects that it enters the date in the text box or entry box. I hope it was explanatory. :)

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

      @@sujitsingh7279 There's no built in tkinter thing for that..you could hack something together to make something similar, but too complicated to put in a comment here.

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

      @@Codemycom Thanks for the response sir. What are you going to teach us next in this amazing tkinter series?

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

    Where do I write (bd,relief , pady, padx)?? In order to change the shape

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

      what the videos to see.

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

      I don't believe you can change the shape of a widget. Try creating another widget with the disired shape, then kill the old widget.

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

    Much appreciated W.W.

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

    I would like to see a video that one combo box impacts the content of another combo box for example if the combo box has the days of the week the other combo box is set with classes available in a university for each day. The data could be come from a database table,

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

      Check the playlist...dependent dropdowns...pretty sure I've already done it.

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

    how can we clear the previous selection...like override the label text displayed when we change the selection??

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

      I think I discuss that in the playlist

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

    which video covers combo boxes?

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

    My combo box behaves differently when I have it inside a function compared to when it's not inside a function. What I noticed is that when it's not inside a function, the default item is displayed, but once I put the same combobox code inside a function, the default item doesn't display. Otherwise, the rest of the code works as expected. Can any one help with this, or has anyone experienced this before.

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

      No, that shouldn't be the case.. you're doing something wrong there. You likely forgot to copy the code that sets the default into the function.

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

    👍🔥

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

    Hi i am trying to make a combo from my database. I got the combox to appear, but no data is in it
    myCombo = ttk.Combobox(root, value= c.execute("SELECT DISTINCT DefectCategory FROM [Teardown ].[dbo].[Defect]"))
    myCombo.set("Defects Category")
    myCombo.grid(row=13, column=1)
    This the code im using, any ideals?

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

      Yeah, what made you think you could make a database call from inside the combo box? Put all that stuff in a variable outside the combo box in the normal way you would make a database call, and try putting the variable in the combo box.

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

      @@Codemycom I did the same thing for the drop down and it worked
      clicked = StringVar()
      clicked.set("Defects Category")
      drop = OptionMenu(root, clicked, *c.execute("SELECT DISTINCT DefectCategory FROM [Teardown ].[dbo].[Defect]"))
      drop.grid(row=7, column=1, columnspan=2, pady=10, padx=10, ipadx=80)
      I try turning it into a variable and see if that works.
      Thanks

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

    Hello,I really need help,I want to make multiple OptionMenus with integers,then make a button to add the integers selected from the optionmenu.Can you help me?

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

      I can just point you to my tkinter playlist...I don't see anything difficult or weird about what you want to do..you should find answers to all of it in the playlist

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

      @@Codemycom i just ant to know how to store multiple optionmenus in a variable

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

      want*

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

      @@raulprahoveanu3980 make the variable a list, store whatever you want in it

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

      @@Codemycom if i use clicked.get(),it just store the last optionmenu,i dont know how to store all of them:(

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

    What if I want my new option to take the position of my first option. E.g, if my first choice was 'yay! It's Friday', can I make my second option, say Tuesday, replace 'yay! It's Friday' ?

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

      Sure, why not

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

      I tried it, but I'm having difficulties, could you throw a little light on it please?🙏🏿

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

      @@emmanuelsambo875 update your label...my_label.config(text=new_stuff) or whatever

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

      Hey, friend. Have you found the solution to your issue? I'm having the same issue right now and it would help me a lot. Thank you!

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

      @@emmanuelsambo875 you have to manipulate the list from where your selections come. Once you do that, it will be reflected in the drop down of the combo box. This issus has nothing to do with the combo box itself. So write code that will manipulate the list, and your problem will be solved. Just make sure your list has global scope, or you can carefully pass the list as an argument when making the appropriate function call.

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

    when i link the combobox to a list it doesnt work unless its an already exsisting list, how can i link it to the box while letting the user create the items of the list?

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

      you can .config() it later with whatever list you want

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

      @@Codemycom thanks sm

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

    How do we get value store in a variable, if we use multiple combox & want to get value on single button click.. like, DOB !?

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

      Sorry, not sure what you mean

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

      @@Codemycom suppose we want to enter user date of birth, so we create 3 combobox (dd-mm-yyyy) now how do we get all three values on single button click..?
      & Store then in an empty variable.. like empty=dd-mm-yyyy

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

    can you please tell me what to do in order to get a value from my dropdown menu to display on a new window?

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

      the same way you get a value from a dropdown menu any time.

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

      @@Codemycom I am made a product page where the user can buy the desired products and choose the quantity of products through the dropdown menu. I want that quantity to be displayed on a new window where I am making the invoice. Can you help me get through this problem? I'm a complete newbie and am learning Tkinter from your channel and I have to make this GUI and submit it to my school soon.

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

      @@ananyasingh1976 Just make the variables global: global variable_name and then you can access them from other windows.

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

      @@Codemycom thank you so much!

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

    @Codemy.com can you please help, I am using ttk themes but It doesn't show OptionMenu() as an option, how do I work around this?

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

      What do you mean, doesn't show it as an option? That's not a thing...

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

      Wait- What?

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

    Does this work the same on customtkinter?

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

      nothing works quite the same with customtkinter...

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

    i tried running this on my mac and it would crash and log me out ... any suggestions on how to run this properly?

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

      There's no reason for that to happen just because you're on a mac...you must have some typo or error in your code..

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

      @@Codemycom hi I completely copied word for word ... but what I did realize that I was not the only one ... a quick google search gave me this which is related but not exactly your code ... github.com/matplotlib/matplotlib/issues/14999 and I realized if I used a conda version of python 3.7.0 version and not 3.7.6 it worked perfectly and no crashing involved. Specifically this:
      Setup the environment using Python 3.7.0, as @ImpatientLearning suggested.
      $ conda create --n python=3.7.0 pip
      $ conda activate
      Thanks for your videos!!

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

      @@Codemycom bugs.python.org/issue37833 also see this

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

      @@christophertnguyen interesting

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

    Sir How to increase size of text in Comboboxes sir.
    Sir please Reply sir

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

      In the normal way you change text font size

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

      @@Codemycom I had a more specific issues with fonts for combo box: The drop down menu will have a different size from the item in the entry of the combo box. Do you please have a better way of solving that. The method I used altered all combo boxes in my project, instead of just modifying the specific one.

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

    How can we increase the sixe and height of the combobox

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

      Change the font size of the text

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

    Can anyone tell me how to add a option list on a canvas?I've been struggling with this option list for so long

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

      Hello Sree Vignesh, I have the same problem can you help me ? or you still don't know?

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

    'from tkinter import *' raises a bunch of Wildcard errors. What should I do about it?

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

      Get rid of whatever weird IDE you're using and use the tools I do.

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

      @@Codemycom What tools do you use?

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

      @@errorhostnotfound1165 Sublime Text Editor and git-scm.com git bash terminal

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

      You also have to import ttk. The very next line of what you wrote should say: from tkinter import ttk, that's where combo boxes live.

  • @minute-ai
    @minute-ai 2 года назад

    how to chnage the color in of the widget in azure theme?

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

      I don't know what azure theme is

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

    Im trying do combobox which will get data from excel and display in scorlled text box

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

    def click():
    lab = Label(root, text=var.get())
    lab.place(x=100,y=100)
    list = ["hello","hey","huuu"]
    Var=Stringvar()
    Var.set(list[0])
    Op=OptionMenu(root, Var, *list, command=click)
    Op.pack()
    When I select any option from option box this gives me a error
    TypeError: click() takes 0 positional arguments but 1 was given
    Please help me how can I solve this error

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

      I don't think you can pack and place at the same time...

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

      @@Codemycom I tried it again by packing the things but it still gives the same error

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

      @@Codemycom but I found the solution for that error from stackoverflow website
      "command = lambda event : click()"
      This gives no error everything works properly
      But "command = click" worked in your video how?

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

    How to searchable/autocomplete combo box?

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

      I think I have a video on that in the playlist

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

    i apply every thing but only the window come up but not the menu

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

    is that heisenberg coding?

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

    How to insert separator to combobox in tkinter

  • @MoMo-id6ri
    @MoMo-id6ri 4 года назад +1

    Combo boxes at 7:52

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

      yep

    • @Momo-bb2fn
      @Momo-bb2fn 4 года назад

      @@Codemycom ur great

    • @Momo-bb2fn
      @Momo-bb2fn 4 года назад

      ​@@Codemycom holy crap i just saw ur linked in: bannerclicks, vitalbio, submission-spider... i don't know if you yourself responded to me, but if you are John Elder, why do you do these tutorials (i mean to ask with genuine, heart-felt curiosity)? What drives you to these specific actions (teaching on youtube)?

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

      @@Momo-bb2fn Thanks!

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

      @@Momo-bb2fn Yeah it's me....I do it because I enjoy it.

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

    sir, I am having a problem with my code. Help me please
    from tkinter import *
    window = Tk()
    def re(string):
    print(string)
    for i in range(0,11):
    Checkbutton(window, text=f"N{i}", command=lambda:re(i)).pack()
    window.geometry("600x500+120+120")
    window.mainloop()
    when I click a checkbutton, I should have got different number according to checkbutton
    but I am getting 10 every time, I click any checkbutton
    Help me please, I am working on my first application.
    I learn coding from youtube and I am a high school kid.

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

      you aren't setting a variable in your checkbox.

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

    In nearly every tutorial, programmers using import * - that is not helping... trust me. Person may get confused is this build in thing or other.

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

      Sorry, but you're wrong.