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
4
votes
1 answer

python tkinter - How can I make ttk Notebook tabs change their order?

Is it possible to do this: with ttk.Notebook widget?
4
votes
0 answers

Is it possible to align the name of ttk notebook tab to the left?

I'm working on a settings menu. I'm using a ttk notebook with tabs for different categories, some categorie names are longer then the others. By default the names align to the right causing it to look like this: I want them to align on the left…
Royi Levy
  • 513
  • 1
  • 3
  • 14
4
votes
1 answer

How can I change the size of tab caption box and font of ttk notebook tabs?

I want to change the font, width and height of a tab caption in ttk.notebook python 3x by below code, i can just change the width of tab caption box text=f'{"frame 1": ^30s} but how i can change the font of "frame 1" and also the height of tab…
amin hajighasemi
  • 43
  • 1
  • 1
  • 4
4
votes
4 answers

tkinter function repeats itself twice when ttk widgets are engaged

The program works as intended when I simply use tkinter's widgets. When I use ttk's widgets the program repeats itself twice. I tried almost everything in my knowledge to fix this, I believe that *args have something to do with it. Is there anyway…
Magotte
  • 143
  • 10
4
votes
1 answer

Center align a group of widgets in a frame

If there's a single widget in a frame's row, I can align it to any side with sticky=, or center align by omitting sticky. However, when there are multiple columns in a row, objects in them end up left-aligned: while I wish for them to stay in the…
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
4
votes
1 answer

How do I get the label position of entry widgets to update properly when changing the font size?

I am creating a tkinter ttk GUI and I made some radio buttons that select the GUI size. This changes, among other things, the global font size for the whole application. I made a quick script to demonstrate it. import tkinter as tk from…
DTreth
  • 87
  • 5
4
votes
2 answers

How to install Python ttk themes

This is my first post on SO, so please feel free to correct me if I'm doing anything wrong! I am making a simple GUI for my Raspberry Pi (that runs Raspbian stretch) on Windows (because I can use PyCharm on there). I am would like to install third…
The Sleepy Penguin
  • 100
  • 1
  • 2
  • 7
4
votes
2 answers

Python/Tkinter: pack equivalent of grid_remove(), eg. pack_remove()?

Is there a pack equivalent of the grid_remove() method where a widget's original pack() settings are restored on a re-pack()? Use case: When I show a packed widget that has been hidden via pack_forget(), I would like to have the widget re-packed…
Malcolm
  • 5,125
  • 10
  • 52
  • 75
4
votes
1 answer

Are Python tkinter ttk themes available based on the operating system

I'm using Python 3.5.2 with the tkinter.ttk module to develop a simple GUI utility on Linux (Kubuntu 16.04). My ttk.__version__ == 0.3.1. There are four widget themes available: 'clam', 'alt', 'classic', 'default'. I had seen elsewhere that other…
user12711
  • 693
  • 1
  • 7
  • 21
4
votes
1 answer

Tkinter: Listbox separators, disabled items, keyboard navigation?

I'm studying the Tkinter Listbox widget and have been unable to find solutions for the following functionality: How can I create non-selectable horizontal separator items, eg. separators equivalent to the Tkinter Menu widget's .add_separator()?…
Malcolm
  • 5,125
  • 10
  • 52
  • 75
4
votes
1 answer

How do I remove the Python3 tkinter ttk.CheckButton dashed line that appears after selecting the checkbox?

Is there any way to remove the dashed outline that appears when clicking the text of the ttk.Checkbutton object while using the 'default' theme? example.) from tkinter import * from tkinter import ttk master = Tk() style = ttk.Style() #…
4
votes
0 answers

How to replace ttk.Treeview parent node arrow with an image?

Question: How does one create in tkinter.ttk.Treeview a node where the toggling arrow of the node is replaced by a defined image? That is, how do I get from my second picture to the first picture as shown below. Problem: The New Mexico Tech Guide…
Sun Bear
  • 7,594
  • 11
  • 56
  • 102
4
votes
3 answers

How to run a python tkinter app without appearing in unity panel or alt-tab

I am working on a countdown timer for Ubuntu using Python and tkinter. I have created most of the parts and now I want my app to be able run without appearing in Unity panel or Alt-Tab switching sequence. Is there any way to do this? And also I'd…
Isuru Pathirana
  • 1,060
  • 1
  • 16
  • 37
4
votes
1 answer

Padding specified in style ignored by Ttk Frame

The following code works as expected, presenting a red background button (with lots of padding) in a green background frame (also with lots of padding). Note that Frame padding is specified both in the Style statement and the ttk.Frame…
David Eklund
  • 182
  • 1
  • 6
4
votes
3 answers

get default background of ttk.Frame

I combined a scrollbar with a ttk notebook by adapting this example and additionally porting it to Python3. I am using ttk widgets as often as possible to get a more 'modern' UI. However, there is no ttk canvas widget, so I used the standard tkinter…
albert
  • 8,027
  • 10
  • 48
  • 84