Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Turtle
  • Python PIL
  • Python Program
  • Python Projects
  • Python DataBase
  • Python Flask
  • Python Django
  • Numpy
  • Pandas
  • Python Database
  • Data Science With Python
  • Machine Learning with Python
  • Django
  • Flask
  • R
Open In App
Next Article:
How to check which Button was clicked in Tkinter ?
Next article icon

Python Tkinter – Create Button Widget

Last Updated : 14 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

The Tkinter Button widget is a graphical control element used in Python’s Tkinter library to create clickable buttons in a graphical user interface (GUI). It provides a way for users to trigger actions or events when clicked.

Note: For more reference, you can read our article:

  1. What is Widgets
  2. Python Tkinter Overview
  3. Python Tkinter Tutorial

Tkinter Button Widget Syntax

The syntax to use the button widget is given below.

Syntax: Button(parent, options)

Parameters

  • parent: This parameter is used to represents the parent window.
  • options:There are many options which are available and they can be used as key-value pairs separated by commas.

Tkinter Button Options

  • activebackground: Background color when the button is under the cursor.
  • activeforeground: Foreground color when the button is under the cursor.
  • anchor: Width of the border around the outside of the button
  • bd or borderwidth: Width of the border around the outside of the button
  • bg or background: Normal background color.
  • command: Function or method to be called when the button is clicked.
  • cursor: Selects the cursor to be shown when the mouse is over the button.
  • text: Text displayed on the button.
  • disabledforeground: Foreground color is used when the button is disabled.
  • fg or foreground: Normal foreground (text) color.
  • font: Text font to be used for the button’s label.
  • height: Height of the button in text lines
  • highlightbackground: Color of the focus highlight when the widget does not have focus.
  • highlightcolor: The color of the focus highlight when the widget has focus.
  • highlightthickness: Thickness of the focus highlight.
  • image: Image to be displayed on the button (instead of text).
  • justify: tk.LEFT to left-justify each line; tk.CENTER to center them; or tk.RIGHT to right-justify.
  • overrelief: The relief style to be used while the mouse is on the button; default relief is tk.RAISED.
  • padx, pady: padding left and right of the text. / padding above and below the text.
  • width: Width of the button in letters (if displaying text) or pixels (if displaying an image).
  • underline: Default is -1, underline=1 would underline the second character of the button’s text.
  • width: Width of the button in letters
  • wraplength: If this value is set to a positive number, the text lines will be wrapped to fit within this length.

Methods

  1. flash(): Causes the button to flash several times between active and normal colors. Leaves the button in the state it was in originally. Ignored if the button is disabled.
  2. invoke(): Calls the button’s command callback, and returns what that function returns. Has no effect if the button is disabled or there is no callback.

Creating a Button using Tkinter

In this example, below code uses the tkinter library to create a graphical user interface. It defines a function, button_clicked(), which prints a message when called. Then, it creates a tkinter window (root) and a button within it, configured with various options like text, color, font, and behavior.

Python
import tkinter as tk  def button_clicked():     print("Button clicked!")  root = tk.Tk()  # Creating a button with specified options button = tk.Button(root,                     text="Click Me",                     command=button_clicked,                    activebackground="blue",                     activeforeground="white",                    anchor="center",                    bd=3,                    bg="lightgray",                    cursor="hand2",                    disabledforeground="gray",                    fg="black",                    font=("Arial", 12),                    height=2,                    highlightbackground="black",                    highlightcolor="green",                    highlightthickness=2,                    justify="center",                    overrelief="raised",                    padx=10,                    pady=5,                    width=15,                    wraplength=100)  button.pack(padx=20, pady=20)  root.mainloop() 

Output

2024-04-2417-34-05online-video-cuttercom-ezgifcom-video-to-gif-converter

Button Widget

Creation of Button without using TK Themed Widget

Creation of Button using tk themed widget (tkinter.ttk). This will give you the effects of modern graphics. Effects will change from one OS to another because it is basically for the appearance.

As you can observe that BORDER is not present in 2nd output because tkinter.ttk does not support border. Also, when you hover the mouse over both the buttons ttk.Button will change its color and become light blue (effects may change from one OS to another) because it supports modern graphics while in the case of a simple Button it won’t change color as it does not support modern graphics.

Python
# import tkinter module  from tkinter import *          # Following will import tkinter.ttk module and  # automatically override all the widgets  # which are present in tkinter module.  from tkinter.ttk import *  # Create Object root = Tk()   # Initialize tkinter window with dimensions 100x100              root.geometry('100x100')       btn = Button(root, text = 'Click me !',                  command = root.destroy)   # Set the position of button on the top of window  btn.pack(side = 'top')       root.mainloop()  

Output

https://media.geeksforgeeks.org/wp-content/uploads/20210216123333/FreeOnlineScreenRecorderProject4.mp4


Note: The tkinter.ttk module provides access to the Tk-themed widget set, introduced in Tk 8.5. If Python has not been compiled against Tk 8.5, this module can still be accessed if Tile has been installed. The former method using Tk 8.5 provides additional benefits including anti-aliased font rendering under X11 and window transparency.
The basic idea for tkinter.ttk is to separate, to the extent possible, the code implementing a widget’s behavior from the code implementing its appearance. tkinter.ttk is used to create modern GUI (Graphical User Interface) applications that cannot be achieved by tkinter itself. 



Next Article
How to check which Button was clicked in Tkinter ?
author
sanjeev2552
Improve
Article Tags :
  • Python
  • Python Tkinter Widget
  • Python-gui
  • Python-tkinter
Practice Tags :
  • python

Similar Reads

  • What are Widgets in Tkinter?
    Tkinter is Python's standard GUI (Graphical User Interface) package. tkinter we can use to build out interfaces - such as buttons, menus, interfaces, and various kind of entry fields and display areas. We call these elements Widgets. What are Widgets in Tkinter?In Tkinter, a widget is essentially a
    3 min read
  • Tkinter Button Widget

    • Python Tkinter - Create Button Widget
      The Tkinter Button widget is a graphical control element used in Python's Tkinter library to create clickable buttons in a graphical user interface (GUI). It provides a way for users to trigger actions or events when clicked. Note: For more reference, you can read our article: What is WidgetsPython
      6 min read

    • How to check which Button was clicked in Tkinter ?
      Are you using various buttons in your app, and you are being confused about which button is being pressed? Don't know how to get rid of this solution!! Don't worry, just go through the article. In this article, we will explain in detail the procedure to know which button was pressed in Tkinter. Step
      2 min read

    • Looping through buttons in Tkinter
      In this article, let’s see how we can loop through the buttons in Tkinter. Stepwise implementation: Step 1: Import the Tkinter package and all of its modules and create a root window (root = Tk()). C/C++ Code # Import package and it's modules from tkinter import * # create root window root = Tk() #
      2 min read

    • How to move a Tkinter button?
      Prerequisite: Creating a button in tkinter Tkinter is the most commonly used library for developing GUI (Graphical User Interface) in Python. It is a standard Python interface to the Tk GUI toolkit shipped with Python. As Tk and Tkinter are available on most of the Unix platforms as well as on the W
      4 min read

    • On/Off Toggle Button Switch in Tkinter
      Prerequisite: Tkinter Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastest and easiest way
      2 min read

    • How to place a button at any position in Tkinter?
      Prerequisite: Creating a button in Tkinter Tkinter is the most commonly used library for developing GUI (Graphical User Interface) in Python. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python offers multiple options for developing a GUI (Graphical User Interface). O
      2 min read

    • How To Dynamically Resize Button Text in Tkinter?
      Prerequisite: Python GUI – tkinter, Dynamically Resize Buttons When Resizing a Window using Tkinter In this article, we will see how to make the button text size dynamic. Dynamic means whenever button size will change, the button text size will also change. In Tkinter there is no in-built function,
      3 min read

    • How to Use Bitmap images in Button in Tkinter?
      Prerequisite: Python GUI – tkinter Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. A bitmap is an array of binary data repr
      2 min read

    • How do you create a Button on a tkinter Canvas?
      In this article, we will see how to create a button on a Tkinter Canvas. The Canvas widget display various graphics on the application. It can be used to draw simple shapes to complicated graphs. We can also display various kinds of custom widgets according to our needs. It is used trigger any funct
      1 min read

    • How to Bind Multiple Commands to Tkinter Button?
      The button widget in Tkinter provides a way to interact with the application. The user presses a button to perform certain actions that are attached to that button. In general, we user provides a single action to a button but what if the user wants to attach more than one action to a button. In this
      4 min read

    • How to add a border color to a button in Tkinter?
      In this article, we will learn how to add border color to a button in Tkinter. In the first example, we are using the frame widget to add border color to a button in frame by highlighting the border with black color and a thickness of 2. Example 1: Using Frame widget to add border color to a button.
      2 min read

    • Change color of button in Python - Tkinter
      In this article, we are going to write a Python script to change the color of the button in Tkinter. It can be done with two methods: Using bg properties.Using activebackground properties.Prerequisite: Creating a button in tkinter, Python GUI – Tkinter Change the color of the button in Python - Tkin
      2 min read

    • How to make Rounded buttons in Tkinter
      Tkinter is a Python module that is used to create GUI (Graphical User Interface) applications with the help of a variety of widgets and functions. Like any other GUI module, it also supports images i.e you can use images in the application to make it more attractive. In this article, we will discuss
      2 min read

    • How to Close a Tkinter Window With a Button?
      Prerequisites: Tkinter Python's Tkinter module offers the Button function to create a button in a Tkinter Window to execute any task once the button is clicked. The task can be assigned in the command parameter of Button() function. Given below are various methods by which this can be achieved. Meth
      3 min read

    • How to Change Tkinter Button State?
      Tkinter is a Python Package for creating GUI applications. Python has a lot of GUI frameworks, but Tkinter is the only framework that’s built into the Python standard library. Tkinter has several strengths; it’s cross-platform, so the same code works on Windows, macOS, and Linux. Tkinter is lightwei
      4 min read

    • How to Pass Arguments to Tkinter Button Command?
      When a user hits the button on the Tkinter Button widget, the command option is activated. In some situations, it's necessary to supply parameters to the connected command function. In this case, the procedures for both approaches are identical; the only thing that has to vary is the order in which
      2 min read

    • Tkinter - Button that changes its properties on hover
      Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and easiest way to create GUI applicatio
      2 min read

    • Dynamically Resize Buttons When Resizing a Window using Tkinter
      Prerequisite: Python GUI – tkinter Button size is static, which means the size of a button cannot be changed once it is defined by the user. The problem here is while resizing the window size, it can affect the button size problem. So the solution here is, make a dynamic button, which means the butt
      2 min read

    • Open a New Window with a Button in Python - Tkinter
      Tkinter is the most commonly used GUI (Graphical User Interface) library in Python. It is simple, easy to learn and comes built-in with Python. The name "Tkinter" comes from the tk interface, which is the underlying toolkit it uses. To create multiple windows in a Tkinter application, we use the Top
      3 min read

    • Python | Add image on a Tkinter button
      Tkinter is a Python module which is used to create GUI (Graphical User Interface) applications with the help of varieties of widgets and functions. Like any other GUI module it also supports images i.e you can use images in the application to make it more attractive. Image can be added with the help
      3 min read

    • Python | Add style to tkinter button
      Tkinter is a Python standard library that is used to create GUI (Graphical User Interface) applications. It is one of the most commonly used packages of Python. Tkinter supports both traditional and modern graphics support with the help of Tk themed widgets. All the widgets that Tkinter also has ava
      4 min read

    Label Widget

    • Python Tkinter - Label
      Tkinter Label is a widget that is used to implement display boxes where you can place text or images. The text displayed by this widget can be changed by the developer at any time you want. It is also used to perform tasks such as underlining the part of the text and spanning the text across multipl
      4 min read

    • How to Change the Tkinter Label Font Size?
      In Tkinter, labels are used to display text but adjusting their font size can improve readability or match a specific design. Tkinter offers multiple ways to modify a label’s font size. Let’s explore different methods to achieve this. Using tkFont.Font()tkinter.font.Font() class allows you to define
      4 min read

    • How to Get the Tkinter Label Text?
      Prerequisite: Python GUI – Tkinter Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and
      2 min read

    • How to Set Border of Tkinter Label Widget?
      The task here is to draft a python program using Tkinter module to set borders of a label widget. A Tkinter label Widget is an Area that displays text or images. We can update this text at any point in time. ApproachImport moduleCreate a windowSet a label widget with required attributes for borderPl
      2 min read

    • How to change the Tkinter label text?
      Prerequisites: Introduction to tkinter Tkinter is a standard GUI (Graphical user interface) package for python. It provides a fast and easy way of creating a GUI application. To create a tkinter application: Importing the module — tkinterCreate the main window (container)Add any number of widgets to
      3 min read

    • Add Shadow in Tkinter Label in Python
      Tkinter is the standard GUI library for Python and is included with most Python installations. It provides a number of widgets and tools for creating graphical user interfaces (GUIs) in Python. One of the most common widgets in Tkinter is the Label widget, which is used to display text and images. I
      4 min read

    • Setting the position of TKinter labels
      Tkinter is the standard GUI library for Python. Tkinter in Python comes with a lot of good widgets. Widgets are standard GUI elements, and the Label will also come under these WidgetsNote: For more information, refer to Python GUI – tkinter  Label: Tkinter Label is a widget that is used to implement
      2 min read

    • Python Tkinter | Create LabelFrame and add widgets to it
      Tkinter is a Python module which is used to create GUI (Graphical User Interface) applications. It is a widely used module which comes along with the Python. It consists of various types of widgets which can be used to make GUI more user-friendly and attractive as well as functionality can be increa
      2 min read

    • How to remove text from a label in Python?
      Prerequisite: Python GUI – tkinter In this article, the Task is to remove the text from label, once text is initialized in Tkinter. Python offers multiple options for developing GUI (Graphical User Interface) out of which Tkinter is the most preferred means. It is a standard Python interface to the
      1 min read

    Entry Widget

    • Python Tkinter - Entry Widget
      Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. Python with Tkinter is the fastest and easiest way to create GUI applications. Creating a GUI using Tkinter is an easy task.In Python3 Tkinter is come
      5 min read

    • How to create a multiline entry with Tkinter?
      Tkinter is a library in Python for developing GUI. It provides various widgets for developing GUI(Graphical User Interface). The Entry widget in tkinter helps to take user input, but it collects the input limited to a single line of text. Therefore, to create a Multiline entry text in tkinter there
      3 min read

    • How to Use Entry Box on Canvas - Tkinter
      There are various ways of creating GUI applications in Python. One of the easiest and most commonly used ways is through the use of the Tkinter module. Tkinter offers various widgets for creating web apps.  One such widget is the Entry box, which is used to display a single line of text. Are you fac
      5 min read

    • How to resize an Entry Box by height in Tkinter?
      In this article, we shall look at how can one resize the height of an Entry Box in Python Tkinter. An Entry Widget is a widget using which a user can enter text, it is similar to HTML forms. In Tkinter, the Entry widget is a commonly used Text widget, using which we can perform set() and get() metho
      3 min read

    • How to Set the Default Text of Tkinter Entry Widget?
      The Tkinter Entry widget is a simple input field in Python that lets users type or edit text. By default, it starts empty unless given an initial value. Adding default text improves user experience by acting as a hint, pre-filling known details and reducing repetitive typing in forms. Let's explore
      2 min read

    • Tkinter - Read only Entry Widget
      Python has a number of frameworks to develop GUI applications like PyQT, Kivy, Jython, WxPython, PyGUI, and Tkinter. Python tkinter module offers a variety of options to develop GUI based applications. Tkinter is an open-source and available under Python license. Tkinter provides the simplest and fa
      4 min read

    • Python Tkinter - Validating Entry Widget
      Python offers a variety of frameworks to work with GUI applications. Tkinter or Tk interface is one of the most widely used Python interface to build GUI based applications. There are applications that require validation of text fields to prevent invalid input from the user before the form is submit
      5 min read

    • Change the position of cursor in Tkinter's Entry widget
      A widget in tkinter, which is used to enter a display a single line of text is called an entry widget. Have you created an entry widget in tkinter which contains a lot of information? Is a lot of text causing an issue to you to move at any other position in it? Don't worry, we have a solution to thi
      3 min read

    • Tkinter | Adding style to the input text using ttk.Entry widget
      Tkinter is a GUI (Graphical User Interface) module which is widely used to create GUI applications. It comes along with the Python itself. Entry widgets are used to get the entry from the user. It can be created as follows- entry = ttk.Entry(master, option = value, ...) Code #1: Creating Entry widge
      2 min read

    Frame Widget

    • Python Tkinter - Frame Widget
      Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastest and easiest way to create GUI applicatio
      3 min read

    • How to create a frame inside a frame tkinter?
      Prerequisite: Tkinter It is very easy to create a basic frame using Tkinter, this article focuses on how another frame can be created within it. To create a basic frame the name of the parent window is given as the first parameter to the frame() function. Therefore, to add another frame within this
      2 min read

    • Create Multiple frames with Grid manager using Tkinter
      Prerequisites: Tkinter Tkinter can support the creation of more than one widget in the same frame. Not just this it also supports a mechanism to align them relative to each other. One of the easiest ways of aligning the different widgets in the Tkinter is through grid manager. Apart from aligning va
      2 min read

    • Python Tkinter - Frameless window
      Prerequisite: Python GUI – tkinter Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. To create a Frameless window, we will us
      1 min read

    • Tkinter Application to Switch Between Different Page Frames
      Prerequisites: Python GUI – tkinter Sometimes it happens that we need to create an application with several pops up dialog boxes, i.e Page Frames. Here is a step by step process to create multiple Tkinter Page Frames and link them! This can be used as a boilerplate for more complex python GUI applic
      6 min read

    • Scrollable Frames in Tkinter
      A scrollbar is a widget that is useful to scroll the text in another widget. For example, the text in Text, Canvas Frame or Listbox can be scrolled from top to bottom or left to right using scrollbars. There are two types of scrollbars. They are horizontal and vertical. The horizontal scrollbar is u
      3 min read

    • How to Change Tkinter LableFrame Border Color?
      LableFrame in Tkinter is the widget that creates the rectangular area which contains other widgets. In this article, we are going to see how we can change the border of the label frame. But for achieving the color, we need to go through the theme for Tkinter, hence we use ttk module for the same whi
      3 min read

    RadioButton Widget

    • RadioButton in Tkinter | Python
      The Radiobutton is a standard Tkinter widget used to implement one-of-many selections. Radiobuttons can contain text or images, and you can associate a Python function or method with each button. When the button is pressed, Tkinter automatically calls that function or method.Syntax: button = Radiobu
      4 min read

    CheckButton Widget

    • Python Tkinter - Checkbutton Widget
      The Checkbutton widget is a standard Tkinter widget that is used to implement on/off selections. Checkbuttons can contain text or images. When the button is pressed, Tkinter calls that function or method. Note: For more reference, you can read our article, What is WidgetsPython Tkinter OverviewPytho
      5 min read

    • Python | Tkinter ttk.Checkbutton and comparison with simple Checkbutton
      Tkinter is a GUI (Graphical User Interface) module which comes along with the Python itself. This module is widely used to create GUI applications. tkinter.ttk is used to create the GUI applications with the effects of modern graphics which cannot be achieved using only tkinter. Checkbutton is used
      2 min read

    • Python | How to dynamically change text of Checkbutton
      Tkinter is a GUI (Graphical User interface) module which is used to create various types of applications. It comes along with the Python and consists of various types of widgets which can be used to make GUI more attractive and user-friendly. Checkbutton is one of the widgets which is used to select
      2 min read

    ListBox Widget

    • Python Tkinter - ListBox Widget
      Tkinter is a GUI toolkit used in python to make user-friendly GUIs.Tkinter is the most commonly used and the most basic GUI framework available in python. Tkinter uses an object-oriented approach to make GUIs.  Note: For more information, refer to Python GUI – tkinter ListBox widget The ListBox widg
      2 min read

    • How to remove multiple selected items in listbox in Tkinter?
      Prerequisite: Tkinter, Listbox in Tkinter Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastes
      2 min read

    • Binding Function with double click with Tkinter ListBox
      Prerequisites: Python GUI – tkinter, Python | Binding function in Tkinter Tkinter in Python is GUI (Graphical User Interface) module which is widely used for creating desktop applications. It provides various basic widgets to build a GUI program. To bind Double click with Listbox we use Binding func
      1 min read

    • Scrollable ListBox in Python-tkinter
      Tkinter is the standard GUI library for Python. Tkinter in Python comes with a lot of good widgets. Widgets are standard GUI elements, and the Listbox, Scrollbar will also come under this Widgets. Note: For more information, refer to Python GUI – tkinter Listbox The ListBox widget is used to display
      2 min read

    • How to get selected value from listbox in tkinter?
      Prerequisites: Tkinter, Listbox ListBox is one of the many useful widgets provided by Tkinter for GUI development. The Listbox widget is used to display a list of items from which a user can select one or more items according to the constraints. In this article, we'll see how we can get the selected
      2 min read

    ScrollBar Widget

    • Python-Tkinter Scrollbar
      Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastest and easiest way to create GUI applicat
      3 min read

    • How to make a proper double scrollbar frame in Tkinter
      Tkinter is a Python binding to the Tk GUI(Graphical User Interface) Toolkit. It is a thin-object oriented layer on top of Tcl/Tk. When combined with Python, it helps create fast and efficient GUI applications. Note: For more information refer, Python GUI-tkinter Steps to Create a double scrollbar fr
      3 min read

    • Autohiding Scrollbars using Python-tkinter
      Before moving on to the topic lets see what is Python Tkinter. So, we all know that Python has different options for creating GUI(s) and tkinter is one of them. It is the standard GUI library for Python. And it makes the creation of GUI applications very quick still simple when python is merged with
      3 min read

    Menu Widget

    • Python | Menu widget in Tkinter
      Tkinter is Python’s standard GUI (Graphical User Interface) package. It is one of the most commonly used package for GUI applications which comes with the Python itself. Menus are the important part of any GUI. A common use of menus is to provide convenient access to various operations such as savin
      2 min read

    • Tkinter - OptionMenu Widget
      Prerequisite: Python GUI -tkinter One of the most popular Python modules to build GUI(Graphical User Interface) based applications is the Tkinter module. It comes with a lot of functionalities like buttons, text-boxes, labels to be used in the GUI application, these are called widgets. In this artic
      2 min read

    • GUI Billing System and Menu Card Using Python
      So imagine that we're starting a new restaurant or being appointed as one of the employees in a restaurant company, and we find out that there's no fast method of doing the billing of customers, and it usually takes times for us to calculate the amount that a customer has to pay. This can be really
      7 min read

    • Right Click menu using Tkinter
      Python 3.x comes bundled with the Tkinter module that is useful for making GUI based applications. Of all the other frameworks supported by Python Tkinter is the simplest and fastest. Tkinter offers a plethora of widgets that can be used to build GUI applications along with the main event loop that
      5 min read

    • Popup Menu in Tkinter
      Tkinter is Python’s standard GUI (Graphical User Interface) package. It is one of the most commonly used packages for GUI applications which comes with the Python itself. Note: For more information, refer to Python GUI – tkinter Menu Widget Menus are an important part of any GUI. A common use of men
      2 min read

    • How to change background color of Tkinter OptionMenu widget?
      Prerequisites: Tkinter While creating GUI applications, there occur various instances in which you need to make selections among various options available. For making such choices, the Option Menu widget was introduced. In this article, we will be discussing the procedure of changing menu background
      2 min read

    • What does the 'tearoff' attribute do in a Tkinter Menu?
      Prerequisite: Python GUI – tkinterMenus Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest
      2 min read

    • How to activate Tkinter menu and toolbar with keyboard shortcut or binding?
      You might have seen the menubar and toolbar in the various desktop apps, which are opened through shortcut keys. Don’t you know how to create such a menubar and toolbar which gets opened through a shortcut key? Have a read at the article and get to know the procedure to do the same. For activating t
      3 min read

    • Changing the colour of Tkinter Menu Bar
      Prerequisites: Tkinter Menus are an important part of any GUI. A common use of menus is to provide convenient access to various operations such as saving or opening a file, quitting a program, or manipulating data. Toplevel menus are displayed just under the title bar of the root or any other toplev
      2 min read

    • How to create Option Menu in Tkinter ?
      The Tkinter package is the standard GUI (Graphical user interface) for python, which provides a powerful interface for the Tk GUI Toolkit. In this tutorial, we are expecting that the readers are aware of the concepts of python and tkinter module. OptionMenu In this tutorial, our main focus is to cre
      3 min read

geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences