Styling GUIs and windows in Python 3 - Tkinter tutorial Python 3.4 p. 5

sentdex · 130K views · 2014 · 9:04

Open on YouTube

Python, Ruby & scripting languagesGUI, HCI & interface historytutorialdated

Why Stack Overflow recommends it

Stack Overflow users cite it as the tutorial they followed when working with ttk styling and building multi-page Tkinter apps, usually in questions about it not behaving as shown.

Recommended by 0 people across 0 different months, 2015 to 2021.

What it is

Part 5 of sentdex's Tkinter tutorial series for Python 3.4. It shows how to restyle windows and widgets using ttk, which gives a more native look and feel, and reuses page-switching code adapted from a Stack Overflow answer.

What people said

Cites Manavalan Gajapathy · 2015-04 · Stack Overflow · on “Python 2.7 - ttk module seemingly not working in Windows 8.1”

Thanks for your comment. If I am not wrong, you have advocated somewhere else in stackoverflow that Tkinter is not dead, and in that argument, you said interface could be effectively modernized using ttk. If that is true, why is ttk failing me in Windows? Does it mean that extensive customized ttk styling is required instead of default ttk themes available? I was excited to use as shown in [this video] but it doesn't work for me. Is that because ttk is heavily improved in Python 3.x?

Cites Forrest Erickson · 2017-10 · Stack Overflow · on “Trying To Add TK Text Window to Example, Import tkinter confusion”

I have been working with several tkinter tutorials including one with Text window and a very helpful tutorial but with out text window. See here: [this video] I have tried to add a Text window to this example but found the constant END was not defined and the Text window did not open or show up in the frame. I traced it down to a difference in the import. Using "from tkinter import *" the constant END was defined (it was 'end') but using the method of this tutorial, "import tkinter as tk" the constant END was not defined. I defined it to clear the error when I try to use Text window the window never opens (never shows up) in the example so I think either I have to rewrite to use the import * meth

Cites Phil C · 2021-03 · Stack Overflow · on “Tkinter - passing 3 user input variables to functions to search a csv file via a pandas query”

What I am trying to do: The user enters the file path to a csv, a field name, and then a keyword/phrase and clicks submit....what is returned are the results of a pandas query structured using their input which reads from the csv they want to use. My code so far: # Relevant Python libraries: import pandas as pd import csv import tkinter as tk fieldname = tk.StringVar() keyword = tk.StringVar() csv_file_path = tk.StringVar() def import_csv_data(self): ????? ????? df = pd.dataframe(pd.read_csv(csv_file_path)) # not sure this is possible, need to define pandas dataframe somewhere? def search(self): print(df[df[fieldname.get()].str.contains(keyword.get()), na=False)] window = tk.Tk() window.titl