You are not logged in.

#1 2017-11-03 02:10:29

johnfocker
Member
Registered: 2016-04-24
Posts: 7

Tkinter and Tk styles

I've been looking for a way to change the default style used in some Python apps (e.g. IDLE) in one of those but couldn't find a conf file for that purpose.
My uderstanding from the few examples I came across is that it's usually hardcoded so I'm stuck with the default ugly classic one?
(Is this why no one ever uses Tk?)

Last edited by johnfocker (2019-01-10 13:48:14)

Offline

#2 2017-11-03 09:12:15

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Tkinter and Tk styles

You can probably set it in Xresources
https://bbs.archlinux.org/viewtopic.php?id=193668


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#3 2017-11-03 10:52:54

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Tkinter and Tk styles

Sidenote: Don't use IDLE; use a proper editor or ide.

As for TK being ugly and "no one" using it:

It can look half decent if whoever writes the code uses TTK, but it is still lacking compared to qt/gtk. A bigger reason for it not being widely used anymore is how dated it is when it comes to functionality and support for modern concepts.

Last edited by Mr.Elendig (2017-11-03 10:54:38)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2017-11-04 02:24:04

johnfocker
Member
Registered: 2016-04-24
Posts: 7

Re: Tkinter and Tk styles

@progandy: Thanks! Just tried and while "xrdb -query" returns "*TkTheme:    clam" as expected, it doesn't change IDLE or git-gui appearance, just like they were overriding the setting or something… weird. I'm starting my i3-wm session with LightDM, don't know if that matters.

@Mr.Elendig: Thank you, yes I wasn't planning on using it much actually and I was thinking of using pycharm first then switch to my good old vim with a few plugins once I know what I'm doing / what I need… The thing is, I was interested in Tk since it's built-in python with tkinter and I thought I could use it for a first GUI.
Guess I'm better off learning how to use gtk bindings instead smile

Cheers

Last edited by johnfocker (2017-11-04 02:24:32)

Offline

Board footer

Powered by FluxBB