My application's GUI is Tkinter based and it is quite functional. I have been trying to use ttk to make it look more modern. I use Python 2.7 in Windows 8.1. Importing ttk goes without error and coding including ttk in the script runs without error. However, the resulting interface looks almost same as the one done only with Tkinter. This is especially true for the buttons. I tried different ttk styles and they almost look same or some worse than Tkinter-only based interface.
Tkversion in my system is 8.5. I have been using ttk that comes as part of Python 2.7 itself. I attempted installing pyttk-0.3.2 from https://pypi.python.org/pypi/pyttk but its installation always fails even after several attempts.
My questions are these:
- Is there a known problem of
Python 2.7's modulettknot playing nice under Windows 8.1? - Is there a possibility of error in
ttklibraries even though it never results in error during import or running code with ttk? - Do i really need to install pyttk-0.3.2?
Also, can you please recommend a software (hopefully minimal - meaning not requiring to install too many external libraries) that is coded in Python 2.7 using Tkinter and ttk? This would help me as a point of reference on testing ttk in my computer.
Thanks in advance!
Updated with code and screenshot: (in response to @Bryan Oakley)
Here is the code I use:
from Tkinter import *
import ttk
root = Tk()
root.geometry("")
root.title("classic")
button_1 = Button(root, text='Tkinter')
button_1.grid(row=0, column=0, padx=10, pady=10)
button_2 = ttk.Button(root, text='ttk')
button_2.grid(row=0, column=1, padx=10, pady=10)
style = ttk.Style()
style.theme_use('classic')
root.mainloop()
Seven ttk theme styles are available: 'winnative', 'clam', 'alt', 'default', 'classic', 'vista', 'xpnative'.
Here is the screenshot (updated on Apr 20) for each type:
