-1

I have an doubt in adding line colour using tkinter

 from tkinter import *

 screen = Tk()
 screen.title("John Arthur - login system")
 screen.geometry("500x300")
 screen.resizable(False,False)

 frame1 = Frame(screen,bg="green",height=100,width=500).pack(side="bottom")
 frame2 = Frame(screen,bg="white",height=100,width=500).pack(after=frame1,side="bottom")
 frame3 = Frame(screen,bg="orange",height=100,width=500).pack(after=frame2,side="bottom")

 Circle = Canvas(screen,width = 100,height = 500,bg=None,lc="blue")
 Circle.place(x = 10,y = 70)
 Circle.create_oval(60,60,210,210)

 screen.mainloop()

here I can create an circle but I need to colour the circle outline as blue can anyone help ?

JOHN ARTHUR
  • 33
  • 10
  • 1
    Btw `frame1`, `frame2`, and `frame3` are all `None` and not actual frames. Look at [this](https://stackoverflow.com/questions/1101750/tkinter-attributeerror-nonetype-object-has-no-attribute-attribute-name) for more info – TheLizzard Aug 23 '21 at 18:13
  • 2
    This is described in the canvas documentation. – Bryan Oakley Aug 23 '21 at 18:14
  • 1
    Setting `bg=None` in `Canvas(...)` cannot make the canvas transparent. Better do all the drawing, i.e. the 3 color bands, inside canvas. – acw1668 Aug 24 '21 at 01:14

1 Answers1

1

You can specify the outline color when you create the circle.

Circle.create_oval(60,60,210,210, outline='blue')
norie
  • 9,609
  • 2
  • 11
  • 18