-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ability to specify name for tk.OptionMenu
and ttk.OptionMenu
#130482
Comments
This is a worthy idea. |
I tried to implement this new feature and created a PR linking to this issue. However, I found that the inability to use the parameter Maybe we need to think about creating a new issue to add all the missing parameters compared to other widgets. (e.g. |
@Xiaokang2022 , there is a workaround for other parameters like |
Initially,
Later, it was reimplemented in Python to make the generated menu accessible as the You can specify all arguments for This is why I think that the proposed idea is reasonable. |
Feature or enhancement
Proposal:
In current implementation of
tk.OptionMenu
andttk.OptionMenu
, we can not specify name to them since adding additionalkwargs
raisesunknown option
errorSince after initialization of widget
name
cannot be changed, hence we cannot specify custom name such asgames_option_menu
etc to theOptionMenu
.Ability to specify name to a widget is very handy, since it helps programmer to easily gain access to widget between diffrent scopes and this ability is lacking in
OptionMenu
widget.Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
tkinter.OptionMenu
andtkinter.ttk.OptionMenu
#130502The text was updated successfully, but these errors were encountered: