Questions tagged [ttkwidgets]

A collection of widgets for Tkinter's ttk extensions by various authors.

98 questions
1
vote
1 answer

Inside a ttk Radiobutton, how to center the text? (anchor not working)

tkinker.ttk justifyandanchor is not working for ttk.Radiobutton. This is my code: from tkinter import * from tkinter import ttk window = Tk() style = ttk.Style() sty = ttk.Style(window) op=IntVar(master=window) sty.configure("TRadiobutton",…
Lzc Tuhao
  • 11
  • 4
1
vote
1 answer

Cannot get value from DateEntry widget in tkinter window. - object has no attribute 'get_date'

My problem is I want to get the value of the date that was selected in the ttk.DateEntry widget. According to this documentation you need to use get_date() Docs It may be that I am misunderstanding the usage of that but I get the following…
DebPepDevuan
  • 469
  • 14
  • 30
1
vote
1 answer

How to change the borderwidth and relief of 1 ttk combobox

I am wanting to change the borderwidth and relief of a ttk combobox. But I only want to change these attributes for 1 combobox. Is there a way to make the second combobox have a borderwidth of 3 and a relief of solid, like the text box 2? import…
Lzypenguin
  • 945
  • 1
  • 7
  • 18
1
vote
0 answers

Completely flat ttk.combobox in python tkinter

How can I make the ttk.combobox like the one in this picture(ttk-Breeze). CODE: from tkinter import * from tkinter import ttk gray1 = "gray15" gray2 = "gray20" gray3 = "gray80" class Theme(): def __init__(self): # =================…
1
vote
1 answer

How can we create a new layout by defining new elements in tkinter ttk widgets

I want to create/modify new elements and define a new layout in tkinter ttk syle but I not sure how to configure that style in a widget. import tkinter as tk from tkinter import ttk def _initialize_style(): style =…
1
vote
1 answer

ttk.Button cleaner change stated reaction

My code works but would like to have a cleaner. I have 24 ON and OFF buttons. When an ON button is clicked, it will be disabled and green, while the OFF button is greyed out and "!disabled". Is there a way to do this without making a ton of ON and…
rayguess22
  • 13
  • 2
1
vote
1 answer

Python ttkwidget Table how to bind event when column width is changed

Looking for a method to get an event when one changes the width of a column Eg. I would like to have an event when the column width (A or B) is changed by user interaction. My example only binds when the full table width is changed from ttkwidgets…
Vik
  • 333
  • 5
  • 14
1
vote
0 answers

Can I invert the way a ttk.Notebook show the content frame?

Hi I am trying to make a program with tabs. And i was wondering if a could use ttk.Notebook inverted. Like in Excel, the tabs are on the bottom but the content frame shows on top. So I was wondering if anyone know if it is possible and wish that if…
1
vote
1 answer

How to keep widgets when a new tab(ttk notebook) is created?

So I have a starter tab which has a textbox inside. I also want to create a new tab on the click of a button. When I create the new tab it does not show the textbox. I want all the tabs to have the same textbox and the same widgets. Here is my code…
Skcoder
  • 299
  • 1
  • 9
1
vote
0 answers

Change color menubar and canvas window ttk

I would like to change the color of my menubar and the canvas of my window in black. But with the ttk.style and config, but I can't find the process to change this. I would like to change the top of window, what's highlighted. And I don't think it's…
Flo Cp
  • 281
  • 2
  • 13
1
vote
1 answer

Is there a way to change the color of a specific option in ttk.OptionMenu on Windows?

I'm trying to write a code to change the color of a specific option in ttk.OptionMenu with press of a button (only that option should appear with the color when seen in the drop down). Here is a code similar to my need. from tkinter import * from…
astqx
  • 2,058
  • 1
  • 10
  • 21
1
vote
2 answers

notebook widget - space between widgets

I'm trying to achieve space between the notebook top panel and frame0\frame1\frame2 why when I'm using pady, like: frame0.grid(row=0, column=0, pady=5) frame1.grid(row=0, column=0, pady=5) frame2.grid(row=0, column=0, pady=5) but there is no…
user13602281
1
vote
1 answer

tkinter notebook widget frame limitation

I was trying to set two different frame in one tab, but as I read somewhere on the internet it is not possible with notebook widget. I have problem with placing buttons - for example 8 buttons below 10 buttons. the buttons below are smaller and…
user13602281
1
vote
1 answer

How to change the color of the dropdown text color of ttk combobox widget?

First I was trying only used: missed_list_combobox.config(foreground="red") Then I was trying to set new style: style_missed_combobox = tkinter.ttk.Style() style_missed_combobox.configure("Red.TCombobox", foreground="red") And use it after create…
user13602281
1
vote
3 answers

ttk checkbutton is not deselected by default

Please kick here to see the current output and expected output I have a simple python program where i want to deselect the checkbutton by default. I want to see it the same way as when a user unchecks a tick box. Please let me know how to achieve…
codehunt
  • 43
  • 4