Python Forum
[Tkinter] macOS Catalina and Python menu issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] macOS Catalina and Python menu issue
#4
the interactive prompt is great for running snippets of code, figuring out problems. With
tkinter it's only good for the basic app a box. All menus need to coded nothing preset, I don't have a mac but I guess it's a default by the operating system. Put your code in a file and run it. Check out elfbot tk menu it's assumes you know how import and you'll need to change the print command it's set up for python 2.7 - I modified the first example
from tkinter import Tk, Menu

root = Tk()

def hello():
    print( "hello!")

# create a toplevel menu
menubar = Menu(root)
menubar.add_command(label="Hello!", command=hello)
menubar.add_command(label="Quit!", command= root.destroy)

# display the menu
root.config(menu=menubar)
root.mainloop()
the link you gave is another problem they created a filedialog in the init and froze the gui. I would recommend guizero to start, it's a tkinter wrapper that is easy to create apps, then tkinter, pyqt5, wx or any other.
you can find it here
best of luck
Reply


Messages In This Thread
RE: macOS Catalina and Python menu issue - by joe_momma - Oct-25-2019, 04:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  macOS Sonoma (14) seems to need a newer version of Tcl/Tk gernophil 1 1,171 Oct-11-2023, 05:53 PM
Last Post: deanhystad
  UI modules: which is most suitable for macOS app design? Anon_Brown 1 1,917 Nov-19-2021, 06:24 PM
Last Post: Larz60+
  macOS GUI pythonnewbi 5 3,110 Jul-05-2020, 03:56 PM
Last Post: ndc85430
  Nesting menu buttons tkinter for python Mocap 1 2,766 Jul-18-2019, 11:46 AM
Last Post: metulburr
  [Tkinter] Image with pillow on macos not showing rhoekstra 3 4,820 May-04-2019, 11:48 PM
Last Post: Larz60+
  Packaging VTK and ITK for macOS sandrider 0 2,044 Nov-01-2018, 05:24 AM
Last Post: sandrider
  [Tkinter] [python]Problem in creating menu[/python] yamoon 10 5,401 Aug-01-2018, 09:01 PM
Last Post: Larz60+
  About Dialog in PyQt5 on macOS cpuin 0 2,907 Jan-23-2018, 08:50 PM
Last Post: cpuin
  packaging a PyQt app for macOS danboid 0 3,156 Mar-30-2017, 06:57 PM
Last Post: danboid

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020