Backporting Python 3 tkinter & ttk code to Python 2.7

前端 未结 1 681
北恋
北恋 2021-01-24 05:47

I\'m following a Sentdex tutorial, found here, specifically this part about creating a GUI in Python. However the tutorial is in python 3 and I\'m using 2.7.

Importing <

相关标签:
1条回答
  • 2021-01-24 06:27

    If you use ttk.Button, it absolutely will use the ttk button. It can't possibly do anything else because you're explicitly saying to use the Button class from the ttk module.

    Note: Depending on what platform you're on, the tk and ttk buttons may look identical.

    Other than the way you do the imports, there's virtually no difference between tkinter in python 2.x and 3.x.

    0 讨论(0)
提交回复
热议问题