close

How to put border for Frame in Python Tkinter

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to put border for Frame in Python Tkinter in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How to put border for Frame in Python Tkinter?

  1. How to put border for Frame in Python Tkinter?

    The requested feature is not called a border in tkinter, it is called a highlight. To get the above request, set highlightbackground="black" and highlightthickness=1.

  2. put border for Frame in Python Tkinter

    The requested feature is not called a border in tkinter, it is called a highlight. To get the above request, set highlightbackground="black" and highlightthickness=1.

Method 1

The requested feature is not called a border in tkinter, it is called a highlight. To get the above request, set highlightbackground="black" and highlightthickness=1. (The border is the empty space reserved around the frame)

Method 2

I request you to read the documentation thoroughly, and look at the styles you can apply to a frame using Tkinter: Tkinter Frame Widget

Here is how you do this:

import tkinter as tk
#tk.Frame(master, **config-options)

my_frame = tk.Frame(parent_widget, borderwidth = 1)

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read