▶️ 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
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)
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!
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.
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 :)
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)
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.
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!
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
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
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.
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.
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?"
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?
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
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.
@@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.
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?
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 :)
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?
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
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
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
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.
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?
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
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 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 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?
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
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?
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?
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
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?
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.
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.
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.
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..
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 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
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
▶️ 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
can you make a video like how to make a dependent dropdown list
@@ezana7401 what are you talking about?
i know it's kinda randomly asking but does anyone know of a good place to stream new movies online?
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)
@@Postulatedstate use .config() whenever you want to change anything in real time...I have many videos showing it's use.
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!
happy to hear it!
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!
Glad to hear it!
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 :)
Thanks for watching!
Another great vid. Thought I'd just leave a comment to help with YT algorithm?
Thanks! Every little bit helps ;-)
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.
Tell your friends! lol
@@Codemycom good reply
@@faizanasif3196 :-p
Thanks for the lessons
:) I had problems with the * I didn't know about that
you are a great person. I have no doubts as little to little things are solved by your videos. Hatsoff Dear!
So nice of you
You always scare me when you say "What's going on ..." :D
lol you're pretty excitable then lol
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 :)
I don't think any...it's really not interesting at all. I think you're overthinking it.
What a journey this was, I learnt a lot!
Happy to hear it!
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)
thanks! I was wondering the same
how would I assign a value for example Monday as 2 so when you select Monday
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.
good point
how do you change that little white box thingy next to the dropdown text?
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.
Check your code for errors
Got same issue
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!
In the show() function you're using a variable (clicked) which is defined outside of it. Isn't there a way around this?
@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?
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
Sure, I have videos on that on the playlist
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
lol every video mentions codemy.com
Amazing tutorial
Thank you!
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?
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.
Is it possible to create arrows linking to other options in dropdown menus?
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.
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?"
Sure, I have videos on dependent drop downs on the playlist
I love you for making these videos
Thanks! Glad you like them
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?
you can .configure() any widget and set the state to disabled.
Great explaination
Thanks!
thanks sir for amazing tutorial🎉❤
welcome
how would you change the the coordinates i tried clicked.grid and place(x=y=) but tbtat didnt work
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
I don't know off hand how to do that, you'll have to hack around and figure it out :-)
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.
@@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.
This Worked, Thanks You :)
You're welcome!
Great video ..Is it possible to populate one combobox based on selection of other combobox using tkinter?
Sure.
Very useful, thanks!!
Welcome!
Thanks for the videos! Realy usesfulls
Glad you like them!
hello, how are u? hey can u help me? i need to disable a textbox with a checkbox, this is possible?
Is it possible to enable scrollbar for long dropdown (I mean having multiple distinct dropdown). Any lead will be appreciated.
Hm, I really don't know
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?
give it a try and see :-p
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..
by passing it into any function like you would pass anything into any function
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 :)
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?
use pythons range function in a for loop
In python's tkinter module. Does OptionMenu not have a font= argument?
Yes it does
very helpful for making hack client drop down menu
Glad it helped
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
probably have some error in your code, but I can't guess what
@@Codemycom Fair yeah thanks for the attempt tho ill just post on stackoverflow
Hi, thank you very much for your video.
Thank you too
good tutorial, can you do a follow-up on ripped pecs ?
Ha! Actually I just got back from the gym and it WAS chest day LOL
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
Thanks! im making a settings menu that lets me set colors for my app, and i was trying to idiot proof it
Welcome
Really helpful
Thx
Thanks for watching!
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
I have videos on all that stuff on the playlist
What's the main difference between OptionMenu and Combobox?
Isn't it self evident?
Could you please add videos for dependent drop-down box for Car brand, colour, model, prize
We'll see..
IM SORRY IM LATE TO CLASS BUT IM HERE
ha
Thanks man!
Welcome!
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.
I don't believe you can easily change that because the operating system determines those colors.
@@Codemycom thanks for the answer! but too bad, because the default grey looks not really nice
would anyone know how to store a specific string or float number in a selection in the list and then display that??
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?
Why does it appear on another window, I don’t know what you mean.
just for that simple pulldown menu we need so many lines of codes?
personally speaking, it is surely not RAD.. (rapid app development).
You think less than a dozen lines of code disqualifies something as being rapid? lol I think you misunderstand something about coding.
How to enable scroll view within a dropdown box sir
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.
sure
@@Codemycom how can i contact u?
@@naz-kh6lj You are talking to me right now
@@Codemycom can i get ur email?
@@naz-kh6lj There's a contact form on codemy.com that goes to me, but I don't do individual consulting or coaching
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
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
Yes you can, using event bindings...I'll discuss it in a video soon.
@@Codemycom Thank you very much sir. Looking forward to that video. Please make it as soon as possible. Thanks a lot in advance
what should i do if i want the selection to call our a function?
check the playlist
Sir can I change the font style of drop down box????
If we can so how ????
Try it and see
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.
Sure, I have videos on the playlist about saving things
@@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.
@@Paul-ly1pw I'd put all the code in the same file and work backwards from there
@@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?
@@Paul-ly1pw You'll just have to play around with your specific needs and discover what works best.
Thank you
You're welcome
Thanks
welcome
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
sure
@@Codemycom cool will tinker with it on mine own first
@@briandw5416 have fun!
@@Codemycom you know I'm not shy bout asking questions lol
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?
can we bind a optionmenu with another optionmenu
Give it a try and see :-p
Out of interest, can you do this with self instead of root, so that it can be used within a specific frame?
Sure...give it a try and see :-p
@@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!
@@scarletdesorgher6378 Sure thing!
Sir I have a question how to use array as an option instead list.
in python arrays are called lists...a list is an array
@@Codemycom oh my... Thank you Sir. Great help. More power to your channel Sir. Thank you very much for your response.
@@micosanpablo5391 sure thing
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?
make the window bigger?
Thanks a lot
Welcome!
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
you have to pip install Pillow on your terminal
why does clicked.get()).pack() have 2 closing parentheses?
because .pack() needs to be outside the function that defined the thing.
Hi!
How to add scrollbar in drop-down.
Hm, never tried that. If you have so many options in your dropdown that you need a scrollbar, you're designing your app poorly.
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?
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.
Option [0] and *option should be concern.
huh?
Can we make button and drop down in a label
sure
@@Codemycom Thanks
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.
how to move position of dropdpwn???
hello teacher
I installed PIL library but when I write it error says
from Pillow import *
ModuleNotFoundError: No module named 'Pillow'
pls your help
Some people have problems with this...you'll have to google the error
@@Codemycom oook thank you
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.
@@oncdastan9947 interesting
@@oncdastan9947 i will check.. Thanks
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..
Hm...
@@Codemycom any idea.. it doesn't show any error or anything..
@@Dr_R3d without seeing your code I couldn't guess
@@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()
@@Codemycom I have remove other lines of code keep the one that is troubling...
does anybody knows if dropdown menus can be enabled/disabled? I am looking everywhere, but can't find the solution.
Sure, set the state="disabled" or state="active" or state="normal"
Great! Very very helpfull. Gracias totales amigos
Thanks!
I got the error:
ModuleNotFoundError: No module named 'tKinter'
I've changed it back to "tkinter" but it still says "tKinter" in the error.
Does anyone know why this won't work with grid instead of pack
It will work with grid just fine. You're just doing something wrong.
Hii...it's not showing the option i select...what should I do
Review your code, compare it to mine, determine what you typed incorrectly.
How can i populate a drop down list based on entering a word into an entry and submitting
I have a video that sort of covers that in my tKinter playlist...
@@Codemycom Thanks, which video?
@@end2399 I don't remember...the crm vids towards the end of the list maybe
Codemy.com Ok thank you
please help me, how can i populate OptionMenu() with sql server database
.
Check the playlist
link would be helpful.
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.
@@PapasooH the playlist link is in the pinned comment right here.
@@Codemycom sorry Sir. but is there any specific title of the video ?
Keep font size large, can't read on mobile phone
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
Double check spelling, punctuation, and spacing
I have a doubt
How can we change the place of this drop down list
don't know what you mean
@@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
@@divyanshipati7432 use the grid system to put it anywhere you want
@@Codemycom i used the grid system and alsoni used padx and pady its not working if possible can u make a video on that
@@divyanshipati7432 you just have a typo in your code. I use the grid in many videos on this playlist.
Hi It is giving me a module not find error on PIL
That happens to some people...you'll have to google it and try a bunch of things until one of them works.
How to make this as a searchable drop-down list?
Not sure what you mean...
@@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
@@kanishkakumarasiri9257 still don't get it...doesn't this video show you exactly that?
@@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?
@@kanishkakumarasiri9257 if you have a menu with hundreds of records, you're just going to have to scroll through them all...
Code is wrong all I get it
TypeError: 'str' object is not callable
Code it not wrong, as proven completely in this video. You typed something wrong.
Wow
Thanks!
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