Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tkinter font style
#1
Here I have code:
Label(window_1, textvariable=display_alarm_switch, font=("Ticking Timebomb BB", 30), fg=colorfg, bg=colorbg).place(x=x_pos, y=y_pos)
It printed with italic style, I need change to regular, how? use style="regular" not work...
Reply
#2
I think you need to specify Regular in font name:
Label(window_1, textvariable=display_alarm_switch, font=("Ticking Timebomb BB REGULAR", 30), fg=colorfg, bg=colorbg).place(x=x_pos, y=y_pos)
Reply
#3
(Oct-24-2020, 07:16 PM)Larz60+ Wrote: I think you need to specify Regular in font name:
Label(window_1, textvariable=display_alarm_switch, font=("Ticking Timebomb BB REGULAR", 30), fg=colorfg, bg=colorbg).place(x=x_pos, y=y_pos)

Ah Yes, Thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Style and Naming Variables rsherry8 3 256 Jun-07-2021, 09:30 PM
Last Post: deanhystad
  Load external font and does not show font in the window ATARI_LIVE 16 1,809 Feb-05-2021, 10:36 PM
Last Post: EthanPayne
  C style strings deanhystad 2 721 May-16-2020, 02:57 PM
Last Post: Larz60+
  Type hinting style and PEP8 hlovatt 2 795 May-07-2020, 08:12 PM
Last Post: hlovatt
  How to generate a log in a list style? wagnergt12 5 826 Apr-22-2020, 12:47 PM
Last Post: buran
  Type hints and style MaxPowers 1 702 Feb-19-2020, 06:56 PM
Last Post: micseydel
  Merging Dictionaries - Optimum Style? adt 5 896 Oct-09-2019, 05:26 PM
Last Post: adt
  Is this good style? league55 3 1,525 Jan-14-2018, 04:25 PM
Last Post: Gribouillis
  Add DSIG to TTF font using ttx font tool Adrian 1 2,021 Nov-11-2017, 12:05 PM
Last Post: Adrian
  Coding style questions -- variables Luke_Drillbrain 12 4,887 Apr-30-2017, 01:21 AM
Last Post: Luke_Drillbrain

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020