Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

tkinter text in canvas

self.canvas = Canvas(root, width=800, height=650, bg = '#afeeee')
self.canvas.create_text(100,10,fill="darkblue",font="Times 20 italic bold",
                        text="Click the bubbles that are multiples of two.")
Comment

tkinter add text to canvas

from tkinter import Tk, Canvas

canvas.create_text(
    539.0, #example position on the x axis
    310.99999999999994, #text position on the y axis
    anchor="nw",
    text="Your text", #Your text
    fill="white",  #or any color
    font=("Inter Bold", 20 * -1) #"inter bold" - font-name and weight
)
Comment

PREVIOUS NEXT
Code Example
Python :: python bin function without 0b 
Python :: validationerror django params 
Python :: how to write manual querry in drf 
Python :: numpy 
Python :: convert to ascii 
Python :: steps in for loop python 
Python :: python if not null 
Python :: disable sns plot python 
Python :: how to join basename and directory in python os 
Python :: df describe 
Python :: matplotlib pie edge width 
Python :: python append to dictionary 
Python :: python flask rest api 
Python :: pkl save multiple files 
Python :: # read table data from PDF into dataframe and save it as csv or json 
Python :: decision tree best param 
Python :: python var power of 2 
Python :: enumerate() 
Python :: how to fit the whole text beside checkbox in ipywidgets 
Python :: python selenium set textarea value 
Python :: how to sort in python 
Python :: null=true django 
Python :: Average of total in django querysets 
Python :: smote on dataframe of feature 
Python :: spacy shortforms explanation 
Python :: pandas combine year month day column to date 
Python :: dependency inversion 
Python :: How can i restrict letters after a number in an input in Python 
Python :: how to create a numpy array linspace in python 
Python :: better way to see full csv in jupyter notebook 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =