tkinter.Style
| ttk.Theme
| tkinter.option_readfile
| tkinter.option_add
, which allow you to modify things like colors, fonts, and other visual aspects of each widget.
Questions tagged [tkinter.style]
13 questions
8
votes
3 answers
How do I change the overall theme of a tkinter application?
I want to change the theme of my tkinter application to clam.
What is the code and where do I put it? I have tried:
from tkinter import *
from tkinter.ttk import *
s=ttk.Style()
s.theme_use('clam')

InsuranceCompanyThatCares
- 111
- 1
- 1
- 6
4
votes
1 answer
A customized menu bar without using the widget tk.Menu
I would like to personalized a menu bar. For example I want to delete the border that appears around the tk.Menu widget (with the add_command() method)
That's my code (I'm using Windows 10)
import tkinter as tk
from tkinter import ttk
dark_grey =…

tsdev2k
- 43
- 5
3
votes
2 answers
Is it possible to have a standard style for a widget?
I want all of the buttons in my gui to have the same style. Right now I manually write in the attributes I want but it takes up so much space. Also, if I wanted to change the style I would have to go to every single button. Is it possible to have a…

justineS
- 31
- 1
3
votes
1 answer
How to make border around ttk.OptionMenu
While trying to make an entry frame I ran into a problem where I can't make border around ttk.OptionMenu in order to make it look similiar to ttk.Entry. (The two next to each other are in image)
Making OptionMenu
option =…

Ladislav Louka
- 256
- 4
- 21
3
votes
1 answer
Create custom ttk style same as 'clam' ttk Theme (button widget specific)
I need to create a custom style for button widgets which has the same appearance as buttons using the ttk 'clam' theme.
I can set the theme like:
s = ttk.Style()
s.theme_use('clam')
However, given the nature of a theme, this will then set all ttk…

Luke.py
- 965
- 8
- 17
2
votes
1 answer
Python Tkinter - Option database only partially working
I'm making a GUI with a dark theme and would like to save time by setting the default parameters using an option database but only some of the options are working. Options like "background" and "font" are working correctly but other things like…

Dave1551
- 323
- 2
- 13
2
votes
1 answer
Customization of Tkinter ttk background style is not being shown
In the following code, the show_widget_validity() function either applies a custom style that has just a change to the background color of a widget's existing style, or restores the original style. This is a library routine, so does not take…

rd_nielsen
- 2,407
- 2
- 11
- 18
2
votes
1 answer
tkinter treeview change column font size
Right now i have this threecode:
tree["columns"] = ("one", "two", "three")
tree.column("one", width=150)
tree.column("two", width=150)
tree.column("three", width=150)
tree.heading("one", text="Naar")
tree.heading("two",…

Klaas
- 39
- 1
- 1
- 8
1
vote
1 answer
Can't apply style to Tkinter slider
I'm trying to apply a style to a slider widget in tkinter. However, the changes to slider_style parameters on the code below don't affect my_slider. Specifically, I'm trying to change the trough width to something smaller. I have seen on different…

Felipe Martins
- 200
- 10
1
vote
0 answers
ttk.OptionMenu outer border around the menu
I try to style a tkinter gui, first this gui is not easy to modify.
I reach the styling i want for the widgets i use, except for one think.
I get lock about this light gray border around the Menu in the ttk.OptionMenu widget.
How removing or…

lluull
- 19
- 4
1
vote
1 answer
TKinter Style & Treeview Click Issues
I am struggling with styles in TKinter
My main problem is that you cannot click anything in the treeview.
To test, simply press the "Press To Test" Button
For some reason it looks like, style.theme_create takes over my treeview widget, and no matter…

Francis Desjardins
- 178
- 1
- 11
1
vote
1 answer
How to make a themed tkinter Radiobutton sunken and raised?
So what I want to achieve is something like this:
So I know this can be done in regular tkinter with indicatoron=0 but this does not work with ttk or themed tkinter. Does anyone know how I would be able to achieve this with what I currently…

Brian Shen
- 21
- 8
0
votes
1 answer
Print tabular formated text into a tk.Text widget, not aligned as its supposed
I couldn't found answer on the internet so I'm hoping you can help me. I'm trying to print from a list into a text box in Tkinter. From some reason, when I print it to text box it's not aligned as its supposed to be but when I print it to the…

Ognjen Lukacevic
- 9
- 2