Questions tagged [ttk]

Ttk is the themed widget set for the Tk toolkit, previously known as Tile.

Ttk refers to the themed widgets, originally part of the Tile extension to Tk, which were integrated into Tk, starting with version 8.5.

Ttk aims to separate the code implementing a widget’s behavior from the code implementing its appearance. It includes 17 widgets that use the native look and feel across platforms. Some are very similar to widgets already existing in normal Tk, while others provide new functionality.

Related tags:

  • - the GUI toolkit that Ttk is a part of
  • - questions related to using Tk from Python
  • - questions related to using Tk from Perl

References:

1143 questions
13
votes
4 answers

Change color of "tab header" in ttk.Notebook

Gretings! I want to change the color displayed in a tab header, created using ttk.Notebook. After search for a while I've found that to change the style of ttk widgets, we can use ttk. Styling, because Notebook apparently do not have configuration…
Justino Rodrigues
  • 552
  • 3
  • 6
  • 16
13
votes
1 answer

Python: ttk: disable/enable a button

I want to change ttk.Button's state according to some internal logic. I create a button and associate a style with it: cardBtnStyle = ttk.Style() cardBtnStyle.configure('CB.TButton') cardBtn = ttk.Button(top, text="Make SD card", style='CB.TButton',…
yegorich
  • 4,653
  • 3
  • 31
  • 37
12
votes
2 answers

Align tabs from right to left using ttk.Notebook widget

I want to align tabs (panes) inside a ttk.Notebook widget from right to left (the default is from left to right). How might this be done? Below is my current code: import Tkinter as tk import ttk root = tk.Tk() root.minsize(300,…
user2980054
  • 453
  • 1
  • 7
  • 21
12
votes
3 answers

3 Different issues with ttk treeviews in python

I am doing a chat client using a treeview with multiple columns in Python. This is the code for the treeview: chat = ttk.Treeview(height="26", columns=("Nick","Mensaje","Hora"), selectmode="extended") chat.heading('#1', text='Nick',…
Saelyth
  • 1,694
  • 2
  • 25
  • 42
12
votes
4 answers

ttk Entry background colour

How exactly do I change the background colour of an Entry widget from ttk? What I have so far is: self.estyle = ttk.Style() self.estyle.configure("EntryStyle.TEntry", background='black') self.estyle.map("EntryStyle.TEntry", …
Firnagzen
  • 1,212
  • 3
  • 13
  • 29
11
votes
2 answers

Tkinter changing the select background color on an unfocused Text widget

I am trying to change the default background color for selected text in a Tkinter Text widget on Mac OS X when the widget does not have focus. The default unfocused select color is gray. After many hours of searching, I was unable to find an…
Jason Oster
  • 1,386
  • 1
  • 13
  • 17
11
votes
3 answers

Setting background color of a tkinter ttk frame

I want to simply set a background color to the frame within the tkinter window. The background color for the window was successfully set, but not for the frame inside. Simply entering bg='color_name or color_code' is not working. How can one set…
11
votes
1 answer

Remove ttk Combobox Mousewheel Binding

I have a ttk Combobox I'd like to unbind from the mousewheel so that scrolling with the wheel while the Combobox is active doesn't change the value (instead it scrolls the frame). I've tried unbind as well as binding to and empty function but…
Andrew Brown
  • 350
  • 1
  • 12
11
votes
2 answers

How to fully change the background color on a tkinter.ttk Treeview

I have been attempting to make a directory browser for a recent project of mine that I'm developing in python 3.4.4 with tkinter. I do not want the background to be the default color, so I have gone about changing the background of most widgets. I…
zlmonroe
  • 330
  • 1
  • 3
  • 10
11
votes
1 answer

How to update values to the listbox under Combobox in ttk Python33

When I create the Combobox, it has no items in the list. Now when I click on the dropdown button a function is called (via the postcommand option), but once in my function I don't know how to set the values in the listbox of the Combobox. Code…
Harvey
  • 2,062
  • 2
  • 21
  • 38
11
votes
3 answers

tkinter scale with two sliders?

Does anyone know if it is possible to have a single scale widget with two "sliders" from the tkinter module? Or anyway to fake it? Such as (edited with GIMP): I am thinking placing one scale on top of another scale, but with a transparent…
Onlyjus
  • 5,799
  • 5
  • 30
  • 42
10
votes
2 answers

get rid of white border around option menu

I'm trying to get rid of the white border around the OptionMenu. What I tried I changed the colour to red, but there is still a white border around it. Can anyone help? Here's the code: from tkinter import * import tkinter as tk from tkinter import…
coderoftheday
  • 1,987
  • 4
  • 7
  • 21
10
votes
3 answers

How to control the tkinter combobox selection highlighting

I wrote a small farad converter to learn GUI programming. It works great, looks fine-ish. The only problem is I can't seem to figure out how to control this strange highlighting that comes up on my ttk.Combobox selections. I did use a ttk.Style(),…
jtkiv
  • 121
  • 1
  • 1
  • 3
10
votes
2 answers

How to change font size in ttk.Button?

This is my problem, I was building an interface for a program, but for needs of the bosses, the font must be larger. I have changed the font size of every widget without any problem, but with the ttk.Buttons, I was unable to change it... I was…
10
votes
1 answer

Ttk Theme Settings

Trying to change the style of a Checkbutton and I'm just curious if its possible to change the size of the box itself? This is what I have so far. Tried 'height' and 'width' in the configure section but doesn't seem to pick it up. s =…
Scribble_Scratch
  • 403
  • 3
  • 18
1 2
3
76 77