Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python change font in 1 line

import tkinter as tk

root = tk.Tk()

txt = tk.Text(root)
txt.pack()

txt.tag_config('warning', background="yellow", foreground="red")

txt.insert('end', "Hello
")
txt.insert('end', "Alert #1
", 'warning')
txt.insert('end', "World
")
txt.insert('end', "Alert #2
", 'warning')

root.mainloop()
Comment

PREVIOUS NEXT
Code Example
Python :: python selenium class 
Python :: python string: escaping characters 
Python :: django default template location 
Python :: metodo estatico de python 
Python :: using pandas stack and subset to return a dataframe object of highly correated pairs 
Python :: output multiple LaTex equations in one cell in Google Colab 
Python :: python get num chars 
Python :: python goose 
Python :: arcpy line density 
Python :: Second step creating python project 
Python :: how to test webhook in python.py 
Python :: dataset ( data.h5 ) containing cat or non-cat images download 
Python :: asyncio run in executor 
Python :: adding if statements in pyhton with tuple 
Python :: numpy array filter and count 
Python :: sqlite3.operationalerror no such column version 
Python :: treesitter python languages 
Python :: make n copies of item in list 
Python :: python type checking dictionary mypy 
Python :: def LinearSearch(array, n, k): 
Python :: tkinter label abstand nach oben 
Python :: Another example: using a colorbar to show bar height 
Python :: Collecting pipnev 
Python :: dinoscape für pc 
Python :: rotch randn 
Python :: rename a variable using .format in python 
Python :: prefetched_related django rest framework 
Python :: add many instances to related field manytoamny django] 
Python :: python fibonacci sequence 
Python :: remove exponent pandas plot 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =