The purpose of this widget is to offer a fixed set of choices to the user in a drop-down menu.
Questions tagged [tkinter.optionmenu]
66 questions
0
votes
0 answers
Is there any way to make an OptionMenu more navigable in tkinter?
So I´m doing a GUI app on Python with tkinter and my dropdown list (alphabetically ordered) is too long (+600 options). Currently the dropdown is created with OptionMenu, but it only has an arrow to go down on the list one by one.
Is there any way…

C A
- 13
- 4
0
votes
1 answer
Is there a way to make tkinter's optionmenu to wait for the users choice?
Im trying to write a tkinter program that creates lots of new drop down lists and buttons depending on the user's choice. For example, a user chooses some option from a drop down list and another drop down list appears which depends on the the…
user17543723
0
votes
0 answers
custom tkinter, make frames and, when optionmenu selected, return selection and frame name
I have a customtkinterGUI where I make some labels with the text: namen.
Within each label I have an optionmenu. After selecting the option, it uses a callback function with "selection" as input, but in I want to make it in such a way that when I…
user17825405
0
votes
0 answers
Tkinter Options menu not displaying Selected value in option menu in Python
Tkinter Options Menu not displaying selection receiving below error
AttributeError: 'NoneType' object has no attribute 'set'
Used this code to add dynamic list to the option menu. Option menu changing dynamically when new list is generated but…

Harry
- 11
- 4
0
votes
0 answers
tkinter: my second option menu broke the first one
I made an option menu with tkinter that worked exactly as I wanted to, but when I added a second option menu I started getting error messages and I'm not sure why. I attached the code for the first and second option menu and the error message.
Code…

HappyFeet
- 5
- 2
0
votes
2 answers
How to know all the disabled options in an Options Menu Tkinter Closed
I have disabled an option in an OptionMenu to fix something in the code where if I click on it just duplicates it, so I thought by disabling the option is an easy work around, but when the user may want to change to another option both the options…

Dodu
- 109
- 2
- 8
0
votes
0 answers
StringVar is not working inside the Optionmenu
I cannot get the StringVar class to work in my OptionMenu widget, it just appears blank in the OptionMenu. This works on my main window but not this pop-up window here is my code.
def create_new():
new = tk.Tk()
new.geometry('300x400')
…

Dodu
- 109
- 2
- 8
0
votes
0 answers
Tracing changes in Optionmenu outputting error (tkinter)
I am trying to detect and save the current selection in the monthNameDropdown Optionmenu so I change the amount of days in the monthDayDropdown Optionmenu, bu it's giving me a strange error that I do not understand. Can someone please help me…

AmarN
- 3
- 2
0
votes
2 answers
text in tkinter Text window is close to scrollbar
I made a text editor with a scrollbar added.
I have two main issues here.
The problem I am facing is that my text does not completely go to the next line when it is
close to the right side and the last character just hides under the scroll bar. I…

Syed Ahmed
- 25
- 6
0
votes
0 answers
How to populate the rest of the columns .grid format based on the Optionmenu in the first column using tkinter
I'm attempting to use tkinter's .grid organization to make a comparative program, comparing qualities from different items in a list. My goal is to have a OptionMenu with every item listed in the first column of every row, and then to populate the…
0
votes
0 answers
Option doesn't show in tkinter's OptionMenu
I am trying to create an OptionMenu, and it works. But, when I click an option, it doesn't show it in the actual dropdown menu. Here is the code (SNIPPET! If you need the full code, ask me):
import os
options2 = []
for i in os.listdir():
…

Maxwell Patrick
- 23
- 7
0
votes
1 answer
"AttributeError: 'function' object has no attribute set" tkinter
I am getting an error that says this when I am trying to use an OptionMenu in tkinter. This is the error:
AttributeError: 'function' object has no attribute 'set'
The code:
from tkinter import *
w = Tk()
w.geometry("250x250")
w.title("OptionMenu…

Maxwell Patrick
- 23
- 7
0
votes
0 answers
Tkinter two windows OptionMenu issue
File one.py
from tkinter import *
import two
root = Tk()
button = Button(text='Click me', command=two.action)
button.pack()
root.mainloop()
File two.py
from tkinter import *
def action():
two = Tk()
list = [1, 2, 3]
clicked =…

Kirill Ivanov
- 77
- 1
- 8
0
votes
0 answers
Check if item in DataFrame exists from a list of items
I couldn't find this anywhere, so I hope someone can help me.
I have a window written with tkinter, which contains an OptionMenu. The OptionMenu consists of the numbers 1 to 4 and the option 'all':
Now this OptionMenu is used as a filter for a…

Ganesh Gebhard
- 453
- 1
- 7
- 20
0
votes
2 answers
How to trigger a run button based on all the values in a list?
I have a Tkinter app and inside that app I have an OptionMenu which is giving me all the id's that are located in the list vehicleid. Please note that this list can become bigger or smaller.
Now I want my button to send the data of owner and…

TangerCity
- 775
- 2
- 7
- 13