Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #102267

Re: Font issues Tkinter/Python 3.5

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From MRAB <python@mrabarnett.plus.com>
Newsgroups comp.lang.python
Subject Re: Font issues Tkinter/Python 3.5
Date Sat, 30 Jan 2016 01:09:59 +0000
Lines 29
Message-ID <mailman.106.1454116211.2338.python-list@python.org> (permalink)
Reply-To MRAB <python@mrabarnett.plus.com>
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset=utf-8
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de eK/QVnxE+3UnJXovHL4elwl3BjRTuJgTxuq5xbecrD0A==
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'defined.': 0.09; 'imported': 0.09; 'def': 0.13; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'missing?': 0.16; 'received:192.168.1.4': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'self.root': 0.16; 'subject:Tkinter': 0.16; 'subject:issues': 0.16; 'wrote:': 0.16; 'tkinter': 0.22; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; "skip:' 10": 0.28; 'always,': 0.29; 'subject:/': 0.30; 'skip:s 30': 0.31; 'skip:_ 10': 0.32; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'header:Message-Id:1': 0.61; 'header:Reply-To:1': 0.67; '>from': 0.76; 'ttk': 0.84
X-CM-Score 0.00
X-CNFS-Analysis v=2.1 cv=K//fZHiI c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=gJVnBG7XAAAA:8 a=wnozkAs-frR0J1oRlJ8A:9 a=QEXdDO2ut3YA:10
X-AUTH mrabarnett@:2500
In-Reply-To <0459973c-dfcd-4733-9078-6e009c105ba2@googlegroups.com>
User-Agent eM_Client/6.0.24432.0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102267

Show key headers only | View raw



On 2016-01-29 22:04:57, "KP" <kai.peters@gmail.com> wrote:

>import tkinter as tk
>from tkinter import ttk
>from tkinter import font
>...
>     def __init__(self):
>         self.root = tk.Tk()
>         self.root.title('Main Window')
>         self.root.geometry('1000x800+200+200')
>         self.root.minsize(width=1000, height=800)
>
>         default_font = tkFont.nametofont("TkDefaultFont")
>         default_font.configure(size=12)
>         self.root.option_add("*Font", default_font)
>         ...
>         self.root.mainloop()
>...
>
>tells me that 'tkFont' is not defined. What am I missing?
>
>As always, thanks for any pointers!
>
  'nametofont' is in tkinter.font, which you have imported as 'font', so 
'tkFont.nametofont' should be 'font.nametofont'.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Font issues Tkinter/Python 3.5 MRAB <python@mrabarnett.plus.com> - 2016-01-30 01:09 +0000

csiph-web