You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we add a context menu to a widget that already has on "built-in" (like entries, text, etc.) then it will add it under. Maybe something like this:
defmake_menu_for_widget():
# return a TkZero menu object that has all the commands and everything set to their respective states# if nothing is returned then don't show a context menu# this function will be called everytime before we show the right-click menuadd_context_menu(widget, make_menu_func=make_menu_for_widget)
The text was updated successfully, but these errors were encountered:
Actually, we should never put on a context menu by default, and have a built in function that will return a "standard" right-click menu for typing widgets (like "cut" "copy" and "paste) for widgets.
Maybe an API like this:
fromTkZero.Menuimportadd_context_menu, entry_context_menu, ContextMenu
...
defmake_menu_for_widget():
# return a TkZero menu object that has all the commands and everything set to their respective states# if nothing is returned then don't show a context menu# this function will be called every time before we show the right-click menumenu=ContextMenu(parent)
# this will add items before and after a "standard" context menumenu.items= [(themenuobjectswealreadyhave, likeMenuCommand)] +entry_context_menu(entry) + [(moremenuobjects)]
returnmenu
...
add_context_menu(entry, make_menu_func=make_menu_for_widget)
If we add a context menu to a widget that already has on "built-in" (like entries, text, etc.) then it will add it under. Maybe something like this:
The text was updated successfully, but these errors were encountered: