Draw text with font : Text « GUI Tk « Python






Draw text with font

Draw text with font
 

from Tkinter import *

root = Tk()
#root.option_readfile('optionDB')
root.title('Canvas')
canvas = Canvas(root, width =400, height=400)

canvas.create_text(350,150, text='text', fill='yellow', font=('verdana', 36))

canvas.pack()
root.mainloop()


           
         
  








Related examples in the same category

1.Draw textDraw text
2.Scrolled TextScrolled Text
3.Change color for tagsChange color for tags
4.Change font for TextChange font for Text
5.Add double click action to a TextAdd double click action to a Text
6.Insert String to a TextInsert String to a Text
7.Text properties: expand and fillText properties: expand and fill
8.Text with ScrollBarText with ScrollBar
9.Show a file in a text widget
10.Search string in TextSearch string in Text