
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How to remove the outline of an oval in Tkinter?
With Tkinter canvas, we can draw shapes for 2D or 3D applications, we can create images, draw animation, and many more things. Let us suppose that we have to create an oval that should be drawn aesthetically on the canvas. There can be other features that can be present to give the oval and other shapes an aesthetic look. To remove the outlining from the shapes in the canvas, we can provide an empty value to the outline property in the method.
Example
#Import tkinter library from tkinter import * #Create an instance of tkinter frame or window win= Tk() #Set the geometry of tkinter frame win.geometry("750x350") #Create a canvas and an oval canvas= Canvas(win, width=400, height=350,bg= "#458a4a") canvas.create_oval(50,50,250,250, fill="white", outline="") canvas.pack() win.mainloop()
Output
Now, execute the code to display the output that contains an oval inside the canvas.
- Related Articles
- Tkinter - How to put an outline on a canvas text
- How to colorize the outline of a canvas rectangle in Tkinter?
- How to colorize the outline of a Tkinter canvas rectangle?
- How to put an outline on a canvas text on Tkinter?
- How to draw an oval in HTML5 canvas?
- How to remove the outline of a circle marker when using pyplot.plot in Matplotlib?
- How to change the thickness of a shape's outline on a Tkinter canvas?
- How to remove the icon from the title bar in Tkinter?
- How to remove multiple selected items in the listbox in Tkinter?
- How to remove focus from a Tkinter widget?
- How to set the color of the outline around an element with JavaScript?
- How to set the width of the outline around an element with JavaScript?
- How to set the style of the outline around an element with JavaScript?
- How to remove the dashed line from the Tkinter menu UI?
- How to remove Ttk Notebook Tab Dashed Line? (tkinter)

Advertisements